Last active
October 1, 2015 15:48
-
-
Save aaronlademann-wf/f8eb24efdf5490ea4d07 to your computer and use it in GitHub Desktop.
Sass Nesting Example 1
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
<nav class="nav"> | |
<ul> | |
<li> | |
<a href="#">Home</a> | |
<a href="#">Page 1</a> | |
<a href="#">Page 2</a> | |
</li> | |
</ul> | |
</nav> |
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
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
.nav { | |
background-color: #ededed; | |
ul { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
} | |
li { | |
display: inline-block; | |
} | |
a { | |
display: inline-block; | |
padding: 6px 12px; | |
text-decoration: none; | |
} | |
} |
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
.nav { | |
background-color: #ededed; | |
} | |
.nav ul { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
} | |
.nav li { | |
display: inline-block; | |
} | |
.nav a { | |
display: inline-block; | |
padding: 6px 12px; | |
text-decoration: none; | |
} |
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
<nav class="nav"> | |
<ul> | |
<li> | |
<a href="#">Home</a> | |
<a href="#">Page 1</a> | |
<a href="#">Page 2</a> | |
</li> | |
</ul> | |
</nav> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment