Terminology Shift in CSS Syntax Level 3

The current CSS specification defines a term many developers may have internalized under a different name. In CSS Syntax Level 3, a style rule is described as a qualified rule that associates a selector list with a list of property declarations and possibly a list of nested rules. The same spec notes the construct was called a rule set in CSS2.

Louis Lazaris read this as the W3C treating "rule set" as somewhat outdated, favoring "style rule" or simply "rule" as shorthand.

Why the New Name Fits

The older phrase is deeply familiar, so switching will take some unlearning. There is no specific note in the spec's Changes section calling out the rename, but the difference is visible when comparing the tables of contents across versions.

Side-by-side screenshot comparing the table of contents for both the CSS 2 and CSS 3 specifications.

Once the parts are named, the reasoning becomes clearer: if the property:value pairs are declarations living in a declaration block, the construct reads less like a set of rules and more like a single rule that defines styles for a selector through a block of declarations.

/* Everything below is a style rule (or rule set, or just rule) */
section { /* Everything between the braces is a declaration block */
  margin: 0 20px; /* This line is an individual declaration */
  color: #888; /* Another declaration */
}

As with most naming debates in CSS, this one lands on a familiar truth: naming things is hard.