LESS CSS concatenate two variables to match one -


im using less dynamically create series of classes. can't seem combine 2 variables match 1 variable have defined.

@import(for.less); 

the pre-defined variables:

@letter-spacing--base: 0; @letter-spacing--xs:   0.2px; 

the loop loops through array:

@classsizes: base, xs; 

the loop creates classes:

.letter-spacing--{     .for(@classsizes); .-each(@value) {          @name: extract(@value, 1);          @valprefix: ~"letter-spacing--";         @valsuffix: @value;          &@{name}{             letter-spacing: ~"@" @valprefix @valsuffix;         }     } } 

this outputs:

.letter-spacing--base {     letter-spacing: @ letter-spacing-- base; } .letter-spacing--xs {     letter-spacing: @ letter-spacing-- xs; } 

it's outputting spaces in between variables doesn't match variables. there way can remove spaces? or maybe there better way of going this.

thanks


Comments

Popular posts from this blog

Unlimited choices in BASH case statement -

Redirect to a HTTPS version using .htaccess -

javascript - jQuery: Add class depending on URL in the best way -