Skip to content

Instantly share code, notes, and snippets.

@Shpigford
Created July 1, 2013 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Shpigford/5901490 to your computer and use it in GitHub Desktop.
Save Shpigford/5901490 to your computer and use it in GitHub Desktop.
// SASS
nav {
a {
color: green;
li.selected & {
color: red;
}
}
}
// OUTPUT I WANT
nav a { color: green; }
nav li.selected a { color: red; }
// OUTPUT I GET
nav a { color: green; }
li.selected nav a { color: red; }
@markh-fod
Copy link

Don't nest for the sake of nesting ;)

nav {
    a {color: green}
    li.selected a {color: red;}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment