Rule Sets
A rule set (also called a rule) comprises a selector followed by a declaration block; the rule set applies the declarations listed in the declaration block to all elements matched by the selector.
Here’s an example of a rule set:
h2 {
color: #666;
font-weight: bold;
}
User-contributed notes
- ID:
- #4
- Date:
- Tue, 29 Jan 2008 13:00:22 GMT
- Status:
- This note has not yet been confirmed for accuracy and relevance.
The term "rule set" is used in the CSS spec and should of course also be used here, but wouldn't it be possible to include a note that a "rule set" commonly is known as a "style"?
It sounds less frightening to newcomers and even adds meaning as it becomes more obvious that "selector plus declaration block" is a "style", which is part of a "style sheet".
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.
