Skip to content

Disallow overqualified elements

nzakas edited this page Oct 24, 2011 · 5 revisions

Writing selectors such as li.active are unnecessary unless the element name causes the class to behave differently. In most cases, it's safe to remove the element name from the selector, both reducing the size of the CSS as well as improving the selector performance (doesn't have to match the element anymore).

Rule ID: overqualified-elements

Clone this wiki locally