Last active
December 26, 2015 07:39
-
-
Save collingo/7116236 to your computer and use it in GitHub Desktop.
Example mapping of preprocessed CSS to semantic HTML
This file contains hidden or 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
nav#primary { | |
ul { | |
li { | |
a { | |
&:hover { | |
} | |
} | |
// context | |
&.home { | |
a { | |
} | |
} | |
&.news { | |
a { | |
} | |
} | |
&.contact { | |
a { | |
} | |
} | |
// states | |
&.selected { | |
// example code reuse using Sass @extend | |
@extend .highlight; | |
} | |
} | |
} | |
} |
This file contains hidden or 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
<nav id="primary"> | |
<ul> | |
<li class="home selected"> | |
<a href="#">Home</a> | |
</li> | |
<li class="news"> | |
<a href="#">News</a> | |
</li> | |
<li class="contact"> | |
<a href="#">Contact</a> | |
</li> | |
</ul> | |
</nav> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment