grunt-css-metrics icon indicating copy to clipboard operation
grunt-css-metrics copied to clipboard

Media queries are not counted properly

Open spaceninja opened this issue 11 years ago • 0 comments

Here's a test case: http://codepen.io/anon/pen/GEcmx

The CSS file contains 4100 rules, and 4101 selectors. 100 of those rules are nested inside two media queries.

grunt-css-metrics gives the following result:

>> Total rules: 4003
>> Total selectors: 4001
>> Average selectors per rule: 1
>> File size: 136.76 KB
>> GZip size: 9.75 KB

Looks like grunt-css-metrics evaluates the media query as a rule, but not the contents of the media query.

spaceninja avatar Feb 24 '14 22:02 spaceninja