Skip to content

Instantly share code, notes, and snippets.

@kaiguogit
Last active August 22, 2016 23:31
Show Gist options
  • Save kaiguogit/7c2aea000f73f2463769b235ce0201c0 to your computer and use it in GitHub Desktop.
Save kaiguogit/7c2aea000f73f2463769b235ce0201c0 to your computer and use it in GitHub Desktop.
CSS Specificity questions

Q: How do you think the word "cascading" in "Cascading Style Sheets" relates to specificity?

A: Cascading means while multiple rules applies to one element, the more specific rule override general rule. The latest applied rule override rules applied earlier.

Q: text in h1 is blank A:

  1. There could be another style sheet applied later, (or closer) to the element that override the style
  2. There could be a embedded style sheet.
  3. There could be another rule in the same stylesheet with same speficity but applied later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment