postcss / postcss-simple-vars

PostCSS plugin for Sass-like variables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variable interpolation - does not allow interpolating multiple variables.

opened this issue · comments

$var1: value_of_var1;
$var2: value_of_var2;

$(var1)text // value_of_var1text
$(var1)$(var2) // Undefined variable $var1value_of_var2

According to this unittest this seems to be the wanted behaviour, but should it really be?
https://github.com/postcss/postcss-simple-vars/blob/master/test/test.js#L29

It seem that the variable interpolation should allow for concatenating multiple variables.

An obvious example is:

width: $(width)$(unit);

Can’t reproduce:

$var1: value_of_var1;
$var2: value_of_var2;

width: $(var1)text;
width: $(var1)$(var2);

Output:

width: value_of_var1text;
width: value_of_var1value_of_var2;