"Additive" property values with LESS mixin -


i'm looking feature may or may not available in less.

i have mixin adds "glow" box-shadow, use on various elements - buttons, inputs etc.

.glow() {     box-shadow: 0 0 5px skyblue; } 

what i'm looking way make mixin add box-shadow new comma-seperated value if element has box-shadow.

so, want this:

.button {     box-shadow: inset 0 5px 10px black;     .glow(); } 

to compile this:

.button {     box-shadow: inset 0 5px 10px black, 0 0 5px skyblue; } 

i think recall seeing similar feature in sass, can't find anywhere now.

does feature exist in less, or there alternative way achieve similar result?

the feature you're looking merge. you'd this:

.glow() {     box-shadow+: 0 0 5px skyblue; } .button {     box-shadow+: inset 0 5px 10px black;     .glow(); } 

note both rulesets need use + syntax work.

or, declare glow rule variable:

@glow: 0 0 5px skyblue;  .button {     box-shadow: inset 0 5px 10px black, @glow; } 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -