-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: :where
is incorrectly purged when it is a child of :not
#1197
Labels
Comments
a hack is to safelist a regex like |
As there’s the same issue (#978) for multiple pseudo-selectors, what I do is the following: const purgeCssOptions = {
safelist: [
/:is/, // https://github.com/FullHuman/purgecss/issues/978
/:where/, // https://github.com/FullHuman/purgecss/issues/978
/:not/, // https://github.com/FullHuman/purgecss/issues/1197
],
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When the pseudo-class
:where
is a child of:not
and the selector inside of:where
is an "unused" selector, it is incorrectly purged.I would also assume that
:is
is also affected by this as both pseudo-classes are treated similarly.To Reproduce
Expected Behavior
The rule should not be purged.
Environment
[email protected]
Add any other context about the problem here
n/a
Code of Conduct
The text was updated successfully, but these errors were encountered: