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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -