rules.scsslint.PropertyCount.html Maven / Gradle / Ivy
Details
Disabled by default
Limit the number of properties in a rule set.
Specifying a large number of properties in a rule set is usually an opportunity
to break down the rule set into smaller more reusable components. It is also
a sign that you might not be leveraging the true power of the "cascade", as you
are explicitly defining a large number of properties many times.
Bad: large number of properties
.class {
color: #f00;
font: 15px arial, sans-serif;
margin: 0;
padding: 0;
}
Good: small number of properties
.class {
margin: 0;
padding: 0;
}
You can specify that the count of properties include properties in nested rule
sets via the include_nested
option. This is useful if you care about the
overall complexity of a generated rule set, rather than just each individual
set.
Configuration Option
Description
include_nested
Whether to include the properties in nested rule sets in the count
max_properties
Maximum number of properties