Skip to content

Instantly share code, notes, and snippets.

@kristoferjoseph
Created March 8, 2014 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristoferjoseph/9437100 to your computer and use it in GitHub Desktop.
Save kristoferjoseph/9437100 to your computer and use it in GitHub Desktop.
Example of Semantic CSS CSSEMENT
header > p {
/* Styles for all <p> in a <header> */
}
/* Wait, you have to style a <p> differently based on context!? */
section > header > p {
/* Styles for all <p> in a header, in a section */
/* Because you never need to style it differently right!? */
}
/* Crap, wait, there is another context where we need to style a <p> in a <header>!? */
div > section > header > p {
/* Had to just wrap that bitch in a <div> so we could add styles for all <p> in a header, in a section */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment