-
Notifications
You must be signed in to change notification settings - Fork 3.4k
selector string interpolation converts color keywords to hex #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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 The fix, should be to replace
with
ie here:
|
thanks @Kalyse. your example is a little bit different but your suggestion is right.
gives me what i was expecting. thanks. |
This is still a bug. The syntax suggested by Kalyse won't work with nested rules using the & combinator. @color: "red"
.something {
~( "&.color-@{color}" )
} 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? |
Nevermind, it looks like what I really found was Issue #864 |
Yes... Do this..
Should work in 1.3.1 |
while adding the test for #691, i found a possible bug.
produces
when i would have hoped it would be
The text was updated successfully, but these errors were encountered: