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
This is obviously not an equivalent structure. This will boil down to:
.foo>button {
color: green
}
.foo>button.warn .foo>button {
color: red
}
.foo>button.warn .foo>button:hover,
.foo>button.warn .foo>button:focus {
color: blue;
}
.barbutton {
color: yellow
}
> .barbutton { /* I don't think this is even valid CSS? */color: blue;
}
Proposed solution
I can't say exactly what's going on under the hood here but there seems to be a fundamental misunderstanding of the > combinator. Obviously I would expect this to be a violation and correctly fixed:
But it seems like something extra is happening and I'm not exactly sure what needs to change there so that correct nesting can still happen while this false positive does not.
The text was updated successfully, but these errors were encountered:
Problem
I've got PostCSS that looks like this with the
nesting
plugin, making use of the>
child combinator:I don't see a deeper way to nest these, but this plugin wants me to.
Expected
No violation, no change. Output of CSS when nesting is resolved should look like:
Encountered
As mentioned above, I see a rule violation on
&.warn > button
and the latter> button
. When I use auto-fix, this is what I get:This is obviously not an equivalent structure. This will boil down to:
Proposed solution
I can't say exactly what's going on under the hood here but there seems to be a fundamental misunderstanding of the
>
combinator. Obviously I would expect this to be a violation and correctly fixed:But it seems like something extra is happening and I'm not exactly sure what needs to change there so that correct nesting can still happen while this false positive does not.
The text was updated successfully, but these errors were encountered: