nex3/sass — Issue #249: Ability to merge multi-value properties
Author: miracle2k
Created: 2012-01-14 16:40:32+00:00
State: open

I sometimes wish there where a way to extend a multi-value property by defining it again, and have the two occurrences be merged rather than the latter replacing the former.

#note
// ... define styles for when the box is moving ...
transition: top 2s

// ...define styles for when the box is expanding ....
transition: height 0.4s

If the other style definitions are large enough, then this allows you to keep each transition with the block of code where it belongs.

Another case would be usage within mixins, which could add transitions without conflicting with user-defined ones.

Not sure what a good syntax would be. Maybe:

transition +:
transition ::

Another approach might be the referencing properties as variable suggestion made here: https://github.com/nex3/sass/issues/109#issuecomment-1582701

transition: top 2s
transition: transition, height 0.4s