Remove space when LESS variable value to string -
below example less mixin code
.mixin(@option) { .set(@options) when (@options = a){ @type: linear; } .set(@option); background: -webkit-~'@{type}'-gradient(...); }
the output
background: -webkit- linear -gradient(...);
how can remove space around linear
?
less not support inplace concatenation via variable interpolation in value statements. need temporary variable (+ auxiliary variable in particular case handle parens), e.g.:
@end-func: ~')'; div { @func: ~'-webkit-@{type}-gradient('; background: @func ... @end-func; }
Comments
Post a Comment