RSS Amplifier

Project Wallace Blog · Jul 23, 2018

New feature: empty rulesets analysis

0
Sign in to vote or save

Bart Veneman in blog · projectwallace.com

When I was scrolling to some of my competitors’ websites, I noticed that analyze-css by Maciej Brencz was counting the amount of empty rules in your CSS. It seemed to me that this was easy to add to Wallace, so I did it in a short amount of time. Here is the explanation that will eventually end up in the docs in some form:

A rule (or ruleset) is considered empty when it contains no declarations. Whitespace is ignored when determining whether a rule is empty or not.

Examples

/* This is an empty rule */
.header {
}
/* This is also an empty rule */
.header {
}
/* This is not an empty rule */
.header {
	margin: 10px;
}

Please note that at-rules are not part of this analysis, so an empty media query rule is not counted here. That might be a future improvement.

Finally, a link to the commit that contains this change.

Back to blog

Popular posts

Read the original on projectwallace.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.