Last active
August 29, 2015 14:10
-
-
Save jeffkamo/95ba20218d94fefa59ed 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 | |
* | |
* Notice how the `a` selector get's output a number of times | |
* equal to how many comma separated selectors it's in? That | |
* can lead to unnecessary bloat | |
*/ | |
.t-home { | |
nav { | |
ol, | |
ul { | |
list-style: none; | |
a { | |
color: red; | |
} | |
} | |
} | |
} | |
/* Better | |
* | |
* Instead of nesting `a` inside of `ol, ul`, just declare | |
* it by itself, and fewer lines of code will be compiled and | |
* the end result will be the same | |
*/ | |
.t-home { | |
nav { | |
ol, | |
ul { | |
list-style: none; | |
} | |
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 | |
* | |
* Notice how the `a` selector get's output a number of times | |
* equal to how many comma separated selectors it's in? That | |
* can lead to unnecessary bloat | |
*/ | |
.t-home nav ol, | |
.t-home nav ul { | |
list-style: none; | |
} | |
.t-home nav ol a, | |
.t-home nav ul a { | |
color: red; | |
} | |
/* Better | |
* | |
* Instead of nesting `a` inside of `ol, ul`, just declare | |
* it by itself, and fewer lines of code will be compiled and | |
* the end result will be the same | |
*/ | |
.t-home nav ol, | |
.t-home nav ul { | |
list-style: none; | |
} | |
.t-home nav a { | |
color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment