Skip to content

Instantly share code, notes, and snippets.

@byrichardpowell
Created August 25, 2012 17:14
Show Gist options
  • Save byrichardpowell/3468077 to your computer and use it in GitHub Desktop.
Save byrichardpowell/3468077 to your computer and use it in GitHub Desktop.
Use Nested Selectors wisely
/* The nav-trail object is clearly separated & namespaced using nested selectors */
.nav-trail { margin:0; padding:0; background:#ccc; }
.nav-trail {
.title { font-weigth:bold; }
ul { margin:0; padding:10px; }
li,
a { dispaly:inline-block; }
}
/* The nav-news object is clearly separated & namespaced using nested selectors */
.nav-news {
.title { font-weigth:bold; }
ul { margin:10px; padding:0; }
li { display:block; padding:10px; background:#ccc; }
a { display:block; background:#ddd; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment