Closed
Description
Bug description
I already know that complex selectors can cause problems, but I think the statement below is quite straightforward and can be expanded safely (currently, the complex selector is preserved). Is it possible to implement this feature, or is there an option to force to expand complex selectors?
Source CSS
:is(.frame, .frame> .wrapper)> .target {
background-color: #ffc;
}
Expected CSS
.frame:not(.does-not-exist)> .target, .frame> .wrapper> .target {
background-color: #ffc;
}
Actual CSS
:is(.frame> .wrapper)> .target {
background-color: #ffc;
}
.frame:not(.does-not-exist)> .target {
background-color: #ffc;
}
Does it happen with npx @csstools/csstools-cli <plugin-name> minimal-example.css
?
N/A
Debug output
postcss-is-pseudo-class: ***.css:1:1: Complex selectors in ':is(.frame, .frame> .wrapper)> .dialog' can not be transformed to an equivalent selector without ':is()'.
postcss-is-pseudo-class: ***.css:1:1: Complex selectors in ':is(.frame> .wrapper)> .dialog' can not be transformed to an equivalent selector without ':is()'.
Extra config
None. Default config.
What plugin are you experiencing this issue on?
PostCSS Is Pseudo Class
Plugin version
2.0.7
What OS are you experiencing this on?
No response
Node Version
16.17.1
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