Domanda

I can't use shorthand when I need to use variable arithmetic in SASS,

This is expected result:

text-shadow: 0 -2px white;

But when I code this:

$shadow: 2px;
text-shadow: 0 -$shadow white;

But I get this:

text-shadow: -2px white;

How to fix that?

È stato utile?

Soluzione

Found a solution:

text-shadow: 0 #{-$shadow} white;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top