Skip to content

Instantly share code, notes, and snippets.

@byrichardpowell
Created August 25, 2012 17:38
Show Gist options
  • Save byrichardpowell/3468310 to your computer and use it in GitHub Desktop.
Save byrichardpowell/3468310 to your computer and use it in GitHub Desktop.
Styling should be independent of markup
/* BAD: This CSS (LESS) is highly dependant on specific markup */
header { /* Styles */ }
header {
section { /* Styles */ }
h1 { /* Styles */ }
small { /* Styles */ }
nav { /* Styles */ }
input[type=search] { /* Styles */ }
}
/* GOOD: This CSS (LESS) is independent of markup */
.header-page { /* Styles */ }
.header-page {
.item { /* Styles */ }
.title { /* Styles */ }
small { /* Styles */ }
.options { /* Styles */ }
.textfield { /* Styles */ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment