Created
December 18, 2013 00:14
-
-
Save alice-liu/8015223 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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.vertical | |
%h1.header.vertical--first header | |
%ul.list.vertical--last | |
%li.item | |
%a.link blah | |
- for i in 1..2 do | |
%li.item__nested | |
%a.link nested! | |
%ul.list | |
%li.item | |
%a.link inside | |
%li.item | |
%a.link inside 2 | |
%li.item__nested.vertical--last | |
%a.link nested last | |
%ul.list.vertical--last | |
%li.item.vertical--last | |
%a.link inside |
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.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
$border-radius: 20px; | |
.vertical { | |
border: 1px solid red; | |
border-radius: $border-radius; | |
width: 300px; | |
} | |
// State? | |
.vertical--first { | |
box-shadow: inset 0 2px 0 0 rgba(255, 255, 255, 0.95); | |
border: { | |
top-left-radius: $border-radius; | |
top-right-radius: $border-radius; | |
} | |
} | |
.vertical--last { | |
border: { | |
bottom-left-radius: $border-radius; | |
bottom-right-radius: $border-radius; | |
} | |
} | |
.header { | |
background: rgb(255, 100, 255); | |
margin: 0; | |
padding: 6px; | |
// Never last | |
border-bottom: 1px green solid; | |
} | |
.list { | |
background: gray; | |
margin: 0; | |
list-style-type: none; | |
padding-left: 0; | |
} | |
.item { | |
~ .item { | |
border-top: 1px solid green; | |
} | |
} | |
.link { | |
display: inline-block; | |
padding: 6px; | |
} | |
.item__nested { | |
@extend .item; | |
.list { | |
background: rgb(200, 255, 255); | |
} | |
.item { | |
.link { | |
padding-left: 20px; | |
} | |
& ~ .item { | |
border-top: 1px red solid; | |
} | |
&:first-child { | |
border-top: 1px green solid; | |
} | |
} | |
} |
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
.vertical { | |
border: 1px solid red; | |
border-radius: 20px; | |
width: 300px; | |
} | |
.vertical--first { | |
box-shadow: inset 0 2px 0 0 rgba(255, 255, 255, 0.95); | |
border-top-left-radius: 20px; | |
border-top-right-radius: 20px; | |
} | |
.vertical--last { | |
border-bottom-left-radius: 20px; | |
border-bottom-right-radius: 20px; | |
} | |
.header { | |
background: #ff64ff; | |
margin: 0; | |
padding: 6px; | |
border-bottom: 1px green solid; | |
} | |
.list { | |
background: gray; | |
margin: 0; | |
list-style-type: none; | |
padding-left: 0; | |
} | |
.item ~ .item, .item__nested ~ .item, .item ~ .item__nested, .item__nested ~ .item__nested { | |
border-top: 1px solid green; | |
} | |
.link { | |
display: inline-block; | |
padding: 6px; | |
} | |
.item__nested .list { | |
background: #c8ffff; | |
} | |
.item__nested .item .link, .item__nested .item__nested .link { | |
padding-left: 20px; | |
} | |
.item__nested .item ~ .item, .item__nested .item__nested ~ .item, .item__nested .item ~ .item__nested, .item__nested .item__nested ~ .item__nested { | |
border-top: 1px red solid; | |
} | |
.item__nested .item:first-child, .item__nested .item__nested:first-child { | |
border-top: 1px green solid; | |
} |
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='vertical'> | |
<h1 class='header vertical--first'>header</h1> | |
<ul class='list vertical--last'> | |
<li class='item'> | |
<a class='link'>blah</a> | |
</li> | |
<li class='item__nested'> | |
<a class='link'>nested!</a> | |
<ul class='list'> | |
<li class='item'> | |
<a class='link'>inside</a> | |
</li> | |
<li class='item'> | |
<a class='link'>inside 2</a> | |
</li> | |
</ul> | |
</li> | |
<li class='item__nested'> | |
<a class='link'>nested!</a> | |
<ul class='list'> | |
<li class='item'> | |
<a class='link'>inside</a> | |
</li> | |
<li class='item'> | |
<a class='link'>inside 2</a> | |
</li> | |
</ul> | |
</li> | |
<li class='item__nested vertical--last'> | |
<a class='link'>nested last</a> | |
<ul class='list vertical--last'> | |
<li class='item vertical--last'> | |
<a class='link'>inside</a> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
</nav> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment