css - Arguments not working properly in SASS @mixin -
i've been using sass (specifically scss bit) spreadsheets, , until had been going well. use quite few css3 features aren't implemented yet in browsers, , figured write mixin did extent:
@mixin multilang($what, $value) { $what: $value; -khtml-#{$what}: $value; -webkit-#{$what}: $value; -o-#{$what}: $value; -moz-#{$what}: $value; } and call @include multilang(user-select, none);, instead, compiled css littered things -khtml-none: none, etc.
now, figure i'm doing wrong here, can't quite seem figure out is. tried putting quotes around things, using named arguments, etc., has same problem.
you need wrap first $what this
@mixin multilang($what, $value) { #{$what}: $value; -khtml-#{$what}: $value; -webkit-#{$what}: $value; -o-#{$what}: $value; -moz-#{$what}: $value; }
Comments
Post a Comment