Skip to content
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

& cannot be used in variable selectors #2080

Closed
danielrentz opened this issue Jun 30, 2014 · 2 comments
Closed

& cannot be used in variable selectors #2080

danielrentz opened this issue Jun 30, 2014 · 2 comments

Comments

@danielrentz
Copy link

minimal example:

.mixin(@selector) { @{selector} { color: red; } }
div { .mixin("> span"); .mixin("&"); }

resolves to
div > span { color: red; }
instead of
div > span { color: red; }
div { color: red; }

@seven-phases-max
Copy link
Member

I'm not closing this as there's not dedicated issue but essentially it's the same thing as #2079 (i.e. duplicate of #1421).
Currently Less does not evaluate the contents of a variable used for selector interpolation but just expands the variable "as is" (i.e. no special symbols like comma or & have any meaning there).

@seven-phases-max
Copy link
Member

Closing as duplicate of #1546.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants