The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS transforms…changing them = redundancy?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #205220

    if I have :

    transform: translateX(50%) rotate(90deg) scale(1.0);

    and then when the item is “active” (new class added…so change in css) then i want to for example increase the scale of it…

    I end up having to do the same thing again

    transform: translateX(50%) rotate(90deg) scale(1.05);

    —> why can’t we just do : transform: scale(1.05) and only the updated one works? i mean I guess I understand why because you might actually want to do that, but is redundancy the only way to change a PIECE of a transform (without going into the matrix..ugh)?


    Basically yes. Because it’s a single property declaration not shorthand like “background”.

    So if you want to change the property you have to change all of it.

    Either that or you have a whole bunch of separate properties like” transform-rotate” and “transform-translate” each with, potentially it’s own transform origin.

    And that way leads to madness.


    Currently (unfortunately) yes, but should be solved sometime in the future (in case someone’s interested):


    That’s pretty neat!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.