#1197·purgecss

[Bug]: `:where` is incorrectly purged when it is a child of `:not`

Author: AdrianGonz97Created Dec 3, 2023Updated Jul 8, 2026
Labelsbug

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

css
.root :not(:where(.unused)) {
    color: purple;
}

Expected Behavior

The rule should not be purged.

Environment

[email protected]

Add any other context about the problem here

n/a

Code of Conduct

  • I agree to follow this project's Code of Conduct