Skip to content

Instantly share code, notes, and snippets.

@trongthanh
Created June 24, 2014 15:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Essential CSS Training - Cascading & Specificity
/**
* Essential CSS Training - Cascading & Specificity
*/
html {
font-family: sans-serif;
font-size: 200%;
}
.blue {
color: blue;
}
.red {
color: red;
}
/*
#box {
color: green;
}
.box {
color: purple;
}*/
/*.container .box {
color: cyan;
}
.container p {
color: yellow;
}*/
/*
.box.red {
color: red;
}
.container .box {
color: blue;
}*/
<div id="parent" class="parent container">
<p id="box" class="box red blue">Hello World</p>
</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment