Last active
December 17, 2015 09:08
-
-
Save stereoscott/5584743 to your computer and use it in GitHub Desktop.
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
<body class="overview"> | |
<section class="overview-section engage-section"> | |
<h1 class="overview-section-header engage-section-header">xxx</h1> | |
</section> | |
<section class="overview-section measure-section"> | |
<h1 class="overview-section-header measure-section-header">xxx</h1> | |
</section> | |
</body> | |
<body class="how"> | |
<section class="how-section deliver-section"> | |
<h1 class="how-section-header delivery-section-header">xxx</h1> | |
</section> | |
</body> |
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
<body class="overview"> | |
<section class="content engage"> | |
<h1 class="header">xxx</h1> | |
</section> | |
<section class="content measure"> | |
<h1 class="header">xxx</h1> | |
</section> | |
</body> | |
<body class="how"> | |
<section class="content deliver"> | |
<h1 class="header">xxx</h1> | |
</section> | |
</body> |
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
// all sections | |
.overview-section, .how-section {} | |
// specific section | |
.engage-section {} | |
// all headers | |
.engage-section-header, .how-section-header {} | |
/* OR */ | |
// all sections | |
.content {} | |
// specific section | |
.engage {} | |
// all headers | |
.content .header {} |
Yours is totally cleaner. And still is semantic and reusable. I knew I got crazy with class names. I think a better approach for me would be to write all html first then style from general to specific. I stared out styling individual elements too soon.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, I like leaving the html element names out of the class names (unless the html element happens to be the same semantically... like 'section')