Is there a way to directly assign a CSS value to a SASS variable, like this:
$var:padding: 20px/1440px * 100%;
I know that I can to this:
$padding: 20px/1440px * 100%;
padding: $padding;
But is there a way to directly assign a value in CSS to a variable? Basically to have it on a same line.
not possible to use a variable directly, you could use a mixin instead:
@mixin pad{padding: 20px/1440px * 100%;}
.div-with-padding{@include pad;}
http://jsfiddle.net/gTsG9/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With