Last active
October 1, 2015 16:16
-
-
Save aaronlademann-wf/7d34436af70858e52e3a to your computer and use it in GitHub Desktop.
Sass Nesting Example 2
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 grid-block"> | |
<ul class="grid-block grid-content grid-collapse-vertical"> | |
<li> | |
<a href="#">Home</a> | |
<a href="#">Page 1</a> | |
<a href="#">Page 2</a> | |
</li> | |
</ul> | |
<div class="grid-block grid-content grid-collapse-vertical"> | |
<div class="user-info"> | |
You are logged in as | |
<a href="#">Aaron</a> | |
</div> | |
</div> | |
</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 6px 11px; | |
text-decoration: none; | |
color: #595959; | |
border-right: 1px solid rgba(0,0,0,.15); | |
} | |
} | |
.user-info { | |
text-align: right; | |
} |
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 6px 11px; | |
text-decoration: none; | |
color: #595959; | |
border-right: 1px solid rgba(0, 0, 0, 0.15); | |
} | |
.user-info { | |
text-align: right; | |
} |
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 grid-block"> | |
<ul class="grid-block grid-content grid-collapse-vertical"> | |
<li> | |
<a href="#">Home</a> | |
<a href="#">Page 1</a> | |
<a href="#">Page 2</a> | |
</li> | |
</ul> | |
<div class="grid-block grid-content grid-collapse-vertical"> | |
<div class="user-info"> | |
You are logged in as | |
<a href="#">Aaron</a> | |
</div> | |
</div> | |
</nav> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment