• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FullHuman / purgecss / 40113972354
95%

Build:
DEFAULT BRANCH: main
Ran 24 Oct 2026 05:00PM UTC
Jobs 1
Files 7
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Oct 2026 04:58PM UTC coverage: 90.45% (-0.06%) from 90.51%
40113972354

push

github

web-flow
fix(purgecss): keep root-level pseudo-class selectors that still match (#1467)

A CSS rule whose selector is a root-level compound of pseudo-classes
(e.g. ":where(.a):not(_)", ":is(h1, h2, h3)", ":where(:not(.x):not(.y))",
or a bare ":hover") was purged even when the element/class it targets is
present in the scanned content.

Root cause is the terminal value of the matching loop in shouldKeepSelector.
"isPresent" is only set by matchable nodes (class/id/tag/attribute); an absent
one early-returns false, while pseudo-class nodes hit the switch default and
"continue". So the loop reaches "return isPresent" with false in exactly one
case: the compound had no matchable node at all (every node was a pseudo).
Nothing was actually missing, yet the rule was dropped. The classes inside
:where()/:is() are evaluated separately as their own selector nodes, so the
real keep/purge decision (and the empty-:where/:is cleanup) already happens
there -- the compound level only needs to not veto it.

Reaching the end of the loop means no matchable part was found missing, so
return true. This makes the previous isPseudoClassAtRootLevel special case
(which only rescued the single-node form) redundant; remove it.

Fixes the selectors reported in #978 and #1282 (including the :is()+:not()
and Gutenberg :where(:not(...)) shapes). A rule is still purged when none of
the classes/tags it depends on are present.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

464 of 553 branches covered (83.91%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

521 of 536 relevant lines covered (97.2%)

5325.35 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40113972354.1 24 Oct 2026 05:00PM UTC 16
87.79
GitHub Action Run
Source Files on build 40113972354
  • Tree
  • List 7
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #40113972354
  • 6dc4e89d on github
  • Prev Build on main (#40113154747)
  • Next Build on main (#40114931495)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc