theKashey / used-styles

πŸ“All the critical styles you've used to render a page.
MIT License
137 stars 9 forks source link

`:not()` pseudo selector support #33

Closed nnn3d closed 2 years ago

nnn3d commented 2 years ago

At now classes with :not() pseudo selector ignored, simple example:

<!-- html -->
<div class="test"></div>
/* css */
.test {
  display: inline-block;
}

.test:not(.some) {
  padding: 10px;
}

getCriticalRules for this data will produce styles without .test:not(.some) selector:

.test {
  display: inline-block;
}
theKashey commented 2 years ago

There is a bug in selection calculation, and the fix is causing some waterfall-ish update... πŸ§‘β€πŸ­

theKashey commented 2 years ago

v2.3.1 has been released with the patch