markberning
12/14/2017 - 6:33 AM

CSS Cascade Specificity

/*
CASCADE
Cascade follows 3 steps to determine which properties get assigned to an element
1. Importance
  Origin of the style sheet: 
    a. user-agent stylesheet //least important
    b. user-styles(used by some to set for accessibility)
    c. author styles: style.css //most important
2. Specificity
  Resolves conflicts. More specific rules override less specific rules
  IDs //most specific
  Classes //less specific
  element //least specific
  
  Inline styles overrides pages styles which override linked styles
  
3. Source Order
  Styles that come last take precedent