css3 - How can I put a interpolation in sass name of var -


i cant math in loop name of var nane of color var

what do

i want this

this io

i sure have minor syntax error how interpolation works in general , sure it's doable similar approach. see answer corrects error.

however, in place go approach instead (probably in file named _colors.scss):

$brown: (  brown1: #000,  brown2: #000,  brown3: #000,  brown4: #000,  brown5: #000,  brown6: #000 );  @each $key, $value in $brown {   .txt-#{$key} {     color: $value;   } } 

it's called sass maps , it's pretty powerful tool complex use cases well. suggest it. start: https://www.sitepoint.com/using-sass-maps/


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -