Skip to content

Instantly share code, notes, and snippets.

@jeffkamo
Last active August 29, 2015 14:10
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 jeffkamo/95ba20218d94fefa59ed to your computer and use it in GitHub Desktop.
Save jeffkamo/95ba20218d94fefa59ed to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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;
}
}
}
/* 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