Closed arxpoetica closed 3 years ago
What is Expected output?
Sorry updated.
Honestly, I think I'll need to create a repro. The behavior is really strange. I'll see if I can throw something together over the weekend.
I never thought that it worked like this. Seems like it was non predicted feature.
Do you have reasons why it expected and should work?
I'm a mess, lol. I STILL had it wrong above. I've fixed it (again), but for redundancy's sake, here's the correct again:
Expected:
.selector :global h2 {
color: pink;
}
Actual:
.selector :global {
h2 {
color: pink;
}
}
It's just not unfolding the nesting for anything past :global
. There was another ticket about 3rd-level nestings, so it might be the same bug. I know this is working correctly on 5.0.1
but not on anything after.
Yeap. It could be related to https://github.com/postcss/postcss-nested/issues/125
Somebody should debug and send PR, because I am right now on another project,
Should be fixed with PostCSS 8.3.3.
This is still an issue in the latest PostCSS (v 8.3.6). I'll have to create a small repo/repro to show it.
Please create a new issue
Years later...I've figured out this is a bug with https://github.com/a-x-/postcss-global-nested and not yous guys at all. They never updated to the PostCSS 8.0 API (https://evilmartians.com/chronicles/postcss-8-plugin-migration).
I use
postcss-nested
withpostcss-global-nested
, putting nested before the global nested plugin (in order).This works in v4+ of
postcss-nested
and v5.0.1 but not in5.0.0
or5.0.2+
.Given:
Expected:
Actual:
It's a little baffling, because both
5.0.1
and5.0.2
are putting outand
So... 🤷♂️
Happy to put together a repro if needed.