-
Notifications
You must be signed in to change notification settings - Fork 26
Multiple @nest in combined selector don't transform #62
Comments
Hello, the issue you are experiencing is due to syntax. .a {
display: flex;
@nest .foo &, .bar & {
color: #fff;
}
} |
Thanks for your reply. Indeed the issue is fixed when I use that syntax. I must say that I'm not used to have multiple selectors on one line. Please consider adding some |
I do still have an issue with the Input: .a {
display: flex;
&.b &, /* <-- added this line */
@nest .foo &, .bar & {
color: #fff;
}
} Output: .a {
display: flex;
&.b &,
@nest .foo &, .bar & {
color: #fff;
}
} Expected: .a {
display: flex;
}
.a.b,
.foo .a,
.bar .a {
color: #fff;
} I know it's an edge case, but would it be possible to make this work? I'm currently working on a codebase where I don't have control over the HTML, so I have to get creative with the selectors ;) |
Nesting selectors do not concatenate like strings, as they can in Sass. For example, Instead, |
Ahh shoot, I gave you a wrong example. (What you just said makes total sense btw) Apologies, one more time. .a {
display: flex;
&.b,
@nest .foo &, .bar & {
color: #fff;
}
} |
Nesting selector lists either begin with So, in your example, you’ll want to put |
Input:
Output:
Expected:
The second
@nest
is not transformed. This issue is different than #40 because the@nest
selectors are combined with a comma.Versions:
The text was updated successfully, but these errors were encountered: