Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Empty @media queries not purged #964

Open
1 task done
khemarato opened this issue Jul 23, 2022 · 1 comment
Open
1 task done

[Bug]: Empty @media queries not purged #964

khemarato opened this issue Jul 23, 2022 · 1 comment
Labels

Comments

@khemarato
Copy link

khemarato commented Jul 23, 2022

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

  • I agree to follow this project's Code of Conduct
@khemarato khemarato added the bug label Jul 23, 2022
@afreemanio
Copy link

I'm getting this as well.
Related issue: #561

For example:

@media only screen and (min-device-width:1025px) and (max-device-width: 1439px) {
}

doesn't get removed by purgecss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants