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

php - How to display all orders for a single product showing the most recent first? Woocommerce -

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

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -