You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
selector string interpolation converts color keywords to hex #692
This inserts a literal & into my selector. Every other possible location for the & is a syntax error.
I can do exactly what I want if my variable value happens to not be one of the colors by leaving the quotes off of the variable value, i.e. @color: myred. Is there some reason I shouldn't be able to do that?
Activity
Kalyse commentedon Mar 13, 2012
Because red is a color and you aren't interpetting it as a string, it is falling back to any of the colors contained in
less/tree/colors.js.The fix, should be to replace
with
ie here:
neonstalwart commentedon Mar 13, 2012
thanks @Kalyse. your example is a little bit different but your suggestion is right.
gives me what i was expecting. thanks.
vectorjohn commentedon Dec 19, 2012
This is still a bug. The syntax suggested by Kalyse won't work with nested rules using the & combinator.
E.g.:
This inserts a literal & into my selector. Every other possible location for the & is a syntax error.
I can do exactly what I want if my variable value happens to not be one of the colors by leaving the quotes off of the variable value, i.e. @color: myred. Is there some reason I shouldn't be able to do that?
vectorjohn commentedon Dec 19, 2012
Nevermind, it looks like what I really found was Issue #864
lukeapage commentedon Dec 20, 2012
Yes... Do this..
Should work in 1.3.1