You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is a bug in purgecss at the moment (FullHuman/purgecss#978). This seems to be fixed in later versions.
To Reproduce
Have any html file that contains a class name, that is wrapped in :is(.any-class) or :where(.any-class) and run purgecss with the default settings on this html file.
Expected behavior
selector with :where or :is should only be removed, if it is not used inside the html file.
I just wanted to mention this here, as the next version of purgecss seems to fix this issue.
The text was updated successfully, but these errors were encountered:
I don't think it's possible to solve this issue on this integration level, but I see that in the original issue, there was a workaroud mentioned: FullHuman/purgecss#978 (comment)
This integration allows you to pass options to the underlying postcss
exportdefaultdefineConfig({integrations: [purgecss({fontFace: true,keyframes: true,safelist: ['random','yep','button',/^nav-/],blocklist: ['usedClass',/^nav-/],content: [process.cwd()+'/src/**/*.{astro,vue}'// Watching astro and vue sources (for SSR, read the note below)]})]});
@the-dijkstra, Thanks, I use this approach already with the workaround. An Idea would be to define purgecss as peerDependency, so that it's easier to update to the latest version of purgecss when the fix is released.
Thanks man, well this repository uses renovate to auto update dependencies so be sure when the latest version of purgecss is published this plugin will get updated right after. I will look though into the idea of making in it as peer dependecy.
Describe the bug
There is a bug in purgecss at the moment (FullHuman/purgecss#978). This seems to be fixed in later versions.
To Reproduce
Have any html file that contains a class name, that is wrapped in
:is(.any-class)
or:where(.any-class)
and run purgecss with the default settings on this html file.Expected behavior
selector with
:where
or:is
should only be removed, if it is not used inside the html file.I just wanted to mention this here, as the next version of purgecss seems to fix this issue.
The text was updated successfully, but these errors were encountered: