Minification should remove empty CSS Selectors


I have CSS Minification turned on and am generally quite happy with it. I noticed, though, that it is leaving some empty selectors, such as @media(min-width:544px){} These should probably be removed, no?

Thanks team! :slight_smile:

Interesting. I wonder how they got there and what’s the usage case of those empty ones being there in the code at all, if so :thinking:

Nevertheless, let us wait for a reply frome someone else :wink:

I’m using GitHub Primer as a basic layer of my CSS, but it adds hundreds of kb of rules I’m not using, so I use PurgeCSS to remove unused rules… however it doesn’t remove comments, whitespace, or (apparently) empty @media queries, hence my relying on Cloudflare’s minification to finish what it started.

1 Like