Created
August 25, 2012 17:38
-
-
Save byrichardpowell/3468310 to your computer and use it in GitHub Desktop.
Styling should be independent of markup
This file contains 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: 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