Created
December 4, 2014 18:27
-
-
Save jeffkamo/0c96bc9a93a6acea3ddd to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
/* Bad example... | |
* | |
* Remember, your Sass doesn't have to look like your HTML | |
*/ | |
body { | |
div { | |
nav { | |
ul { | |
li { | |
a { // this is ridiculous, and extreme | |
color: red; | |
} | |
} | |
} | |
} | |
} | |
} | |
/* Better example | |
* | |
* Less specificity, easier to understand, more maintainable | |
*/ | |
nav a { | |
color: red; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Bad example... | |
* | |
* Remember, your Sass doesn't have to look like your HTML | |
*/ | |
body div nav ul li a { | |
color: red; | |
} | |
/* Better example | |
* | |
* Less specificity, easier to understand, more maintainable | |
*/ | |
nav a { | |
color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment