Forums

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
    Posts
  • #205220
    carinlynchin
    Participant

    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)?

    #205221
    Paulie_D
    Member

    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.

    #205244
    MattDiMu
    Participant

    Currently (unfortunately) yes, but should be solved sometime in the future (in case someone’s interested):
    http://drafts.csswg.org/css-transforms-2/#individual-transforms

    #205254
    Shikkediel
    Participant

    That’s pretty neat!

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