Closed
Description
Bug description
Moving to postcss-preset-env 10.2.2
(which is an update to postcss-is-pseudo-class
) sees a selector start to break, as a pseudo-element is removed (its properties being applied to the parent).
Source CSS
[aria-expanded] {
> span {
:is([aria-expanded='false']) > & {
&::before {
color: var(--mainColor);
}
}
}
}
Expected CSS
postcss-preset-env 10.2.1:
[aria-expanded='false'] > :is([aria-expanded] > span)::before {
color: var(--mainColor);
}
expected:
[aria-expanded='false'][aria-expanded] > span::before {
color: var(--mainColor);
}
even better:
[aria-expanded='false'] > span::before {
color: var(--mainColor);
}
Actual CSS
postcss-preset-env 10.2.2:
[aria-expanded='false'][aria-expanded] > span {
color: var(--mainColor);
}
Playgound example
Does it happen with npx @csstools/csstools-cli <plugin-name> minimal-example.css
?
None
Debug output
No response
Extra config
No response
What plugin are you experiencing this issue on?
PostCSS Preset Env
Plugin version
10.2.2
What OS are you experiencing this on?
No response
Node Version
22.15.0
Validations
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Would you like to open a PR for this bug?
- I'm willing to open a PR
Metadata
Metadata
Assignees
Labels
No labels