Describe the bug
Purgecss purges :where()
top level rules from the astro build
.
To Reproduce
Steps to reproduce the behavior:
Write this in your css:
:where(h1, h2, h3) {
border: 1px solid red;
}
Then npm run build
in your Astro project. Inspect the bundled CSS file and the rule will be gone.
One potentially helpful detail, if your :where()
is not at the top level, then it won't be purged, so something like this for instance will work as expected:
body :where(h1, h2, h3) {
border: 1px solid red;
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too