purgecss
purgecss copied to clipboard
[Bug]: Empty @media queries not purged
Describe the bug
Output css contains useless @media(foo){}
To Reproduce
Have a media query with an unused class inside.
Expected Behavior
The rule and the query should be purged, but actually only the rule is purged and the empty media query stays with only comments and whitespace inside.
Environment
Any?
Add any other context about the problem here
I'm using the Primer framework but not all of its features and am using PurgeCSS to clean what I'm not using
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
I'm getting this as well. Related issue: https://github.com/FullHuman/purgecss/issues/561
For example:
@media only screen and (min-device-width:1025px) and (max-device-width: 1439px) {
}
doesn't get removed by purgecss.