Skip to content

Instantly share code, notes, and snippets.

@trongthanh
Created June 24, 2014 15:41
Show Gist options
  • Save trongthanh/14c8f1918deff419771d to your computer and use it in GitHub Desktop.
Save trongthanh/14c8f1918deff419771d to your computer and use it in GitHub Desktop.
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