How do I reference a variable by its name in SASS? -
i working on sass framework has list of variables turn on , off features.
for example:
// atoms: $use-pa: true; $use-pt: true; $use-pb: true;
i want able following in case variable turned off.
@mixin requires($collection: ()) { @each $var in $collection { #{$var}: true; } }
and
@include requires(( $use-pa, $use-pt, $use-pb ));
i looking way change variable's value name... if possible. #{} not work.
if want change variable's value, don't use interpolation. here's sassmeister play with.
Comments
Post a Comment