sass - Make a variable from a list item -


this question has answer here:

i'm want make variable list item, can't find method paste dollar sign front of it. beneath methods tried.

$hoi: yellow; $test: hoi;  helpme{   background: $#{$test}; //error   background: $$test; //error   background: $nth($test, 1); //error   background: unquote("$")#{$test}; //output: $hoi   background: unquote("$")nth($test, 1); //output: $ hoi }; 

is there method paste dollar sign before variable , still recognized variable?

with pure sass, can't declare variables names taken other variables.

you can using template generate sass code , parse it.

here's example of how compass generating sprite variables: https://stackoverflow.com/a/16129685/901944

bun advise against it. poor practice leads spaghetti code that's difficult maintain. in cases can manage without approach.


Comments

Popular posts from this blog

Need help in packaging app using TideSDK on Windows -

java - Why does my date parsing return a weird date? -

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -