Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 821 Bytes

File metadata and controls

36 lines (24 loc) · 821 Bytes

Max declarations

Limit the total number of declarations in a stylesheet.

a { color: red; background: blue; }
/*  ↑
*   each declaration counts towards the total */

This rule counts every property declaration across the entire stylesheet. Limiting the total number of declarations encourages reuse and helps keep stylesheets concise.

Where per-rule limits catch individual complexity, this catches cumulative scale: a stylesheet can pass every granular check and still have grown too large to reason about as a whole.

Options

Number

Given:

1

the following are considered violations:

a { color: red; background: blue; }

The following patterns are not considered problems:

a { color: red; }