Lecture 16: Understanding the Cascade

Overview:

  1. Author, User, and Browser Settings
  2. What is the Cascade?
  3. What are the Specificities?
  4. The Use of !important
  5. Inheriting Style Information
  6. Order Effects
  7. Summing Up the Cascade

Author, User, and Browser Settings

What is the Cascade?

What are the Specificities?

Single Elements

Groups of Elements

Classes

IDs

Inline Styles

Pseudo-Classes

The Use of !important

Inheriting Style Information

Order Effects

Summing up the Cascade

Selector/Method Specificity
Each element specified 1
Classes 10
Pseudo-classes 10
IDs 100
Inline styles 1000
!important 10,000