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

selector interpolation and nesting #2263

Closed
bassjobsen opened this issue Nov 1, 2014 · 2 comments
Closed

selector interpolation and nesting #2263

bassjobsen opened this issue Nov 1, 2014 · 2 comments

Comments

@bassjobsen
Copy link
Contributor

I'm not sure why the compiled CSS of the following snippets differs, could someone explain that?

@var1: ~"a,b";
@{var1}{c{p:1;}}

@var2: ~"a";
@var3: ~"b";
@{var2},@{var3}{c{p:1;}} 

Compiled CSS:

a,b c {
  p: 1;
}
a c,
b c {
  p: 1;
}
@seven-phases-max
Copy link
Member

seven-phases-max commented Nov 1, 2014

Currently selector interpolation ignores any comma or & in an interpolated variable (thus such variable is always interpreted as a single selector element). Eventually this is considered as something to be improved (see #1421, #1694, #1967 etc.).
A subtle remark though: ~"" is not necessary in this example (and ideally also to be avoided whenever possible in those "future" improvements since the purpose of ~"" (at least I prefer it to be so and thus hardly pushing this idea) is somewhat opposite).

@seven-phases-max
Copy link
Member

Closing as a duplicate of #1421.

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

No branches or pull requests

2 participants