Created
June 13, 2014 19:06
-
-
Save DannyJoris/119756d925ae9d814ea9 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
<div class="container"> | |
<ul class="justified-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="bullets"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="no-bullets"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="horizontal-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="inline-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="delimited-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="inline-block-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
</div> |
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.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// Compass lists: http://compass-style.org/reference/compass/typography/lists | |
// + my own justified list | |
@import "compass/typography/lists"; | |
@mixin justified-list() { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
list-style-image: none; | |
text-align: justify; | |
&:after { | |
content:' '; | |
display:inline-block; | |
width: 100%; | |
height: 0 | |
} | |
li { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
list-style-image: none; | |
@include inline-block; | |
} | |
} | |
body { | |
padding: 20px; | |
} | |
ul { | |
float: left; | |
width: 100%; | |
padding-left: 0; | |
margin: 10px 0; | |
} | |
.bullets { | |
@include pretty-bullets('http://dannyjoris.ca/images/design/list-check.png', $width: 14px, $height: 14px, $line-height: 22px, $padding: 25px); | |
} | |
.no-bullets { | |
@include no-bullet; | |
} | |
.horizontal-list { | |
@include horizontal-list($padding: 10px, $direction: left); | |
li { | |
background: hotpink; | |
color: white; | |
font-family: sans-serif; | |
} | |
} | |
.inline-list { | |
@include inline-list; | |
li { | |
background: hotpink; | |
color: white; | |
font-family: sans-serif; | |
} | |
} | |
.delimited-list { | |
@include delimited-list(' *'); | |
} | |
.inline-block-list { | |
@include inline-block-list($padding: 20px); | |
li { | |
background: hotpink; | |
color: white; | |
font-family: sans-serif; | |
} | |
} | |
.justified-list { | |
@include justified-list(); | |
li { | |
background: hotpink; | |
color: white; | |
font-family: sans-serif; | |
} | |
} |
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 { | |
padding: 20px; | |
} | |
ul { | |
float: left; | |
width: 100%; | |
padding-left: 0; | |
margin: 10px 0; | |
} | |
.bullets { | |
margin-left: 0; | |
} | |
.bullets li { | |
padding-left: 25px; | |
background: url(http://dannyjoris.ca/images/design/list-check.png) no-repeat 5.5px 4px; | |
list-style-type: none; | |
} | |
.no-bullets { | |
list-style-image: none; | |
list-style-type: none; | |
margin-left: 0; | |
} | |
.horizontal-list { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
overflow: hidden; | |
*zoom: 1; | |
} | |
.horizontal-list li { | |
list-style-image: none; | |
list-style-type: none; | |
margin-left: 0; | |
white-space: nowrap; | |
float: left; | |
padding-left: 10px; | |
padding-right: 10px; | |
} | |
.horizontal-list li:first-child { | |
padding-left: 0; | |
} | |
.horizontal-list li:last-child { | |
padding-right: 0; | |
} | |
.horizontal-list li.last { | |
padding-right: 0; | |
} | |
.horizontal-list li { | |
background: hotpink; | |
color: white; | |
font-family: sans-serif; | |
} | |
.inline-list { | |
list-style-type: none; | |
} | |
.inline-list, .inline-list li { | |
margin: 0; | |
padding: 0; | |
display: inline; | |
} | |
.inline-list li { | |
background: hotpink; | |
color: white; | |
font-family: sans-serif; | |
} | |
.delimited-list { | |
list-style-type: none; | |
} | |
.delimited-list, .delimited-list li { | |
margin: 0; | |
padding: 0; | |
display: inline; | |
} | |
.delimited-list li:after { | |
content: " *"; | |
} | |
.delimited-list li:last-child:after { | |
content: ""; | |
} | |
.delimited-list li.last:after { | |
content: ""; | |
} | |
.inline-block-list { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
overflow: hidden; | |
*zoom: 1; | |
} | |
.inline-block-list li { | |
list-style-image: none; | |
list-style-type: none; | |
margin-left: 0; | |
display: inline-block; | |
vertical-align: middle; | |
*vertical-align: auto; | |
*zoom: 1; | |
*display: inline; | |
white-space: nowrap; | |
padding-left: 20px; | |
padding-right: 20px; | |
} | |
.inline-block-list li { | |
background: hotpink; | |
color: white; | |
font-family: sans-serif; | |
} | |
.justified-list { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
list-style-image: none; | |
text-align: justify; | |
} | |
.justified-list:after { | |
content: ' '; | |
display: inline-block; | |
width: 100%; | |
height: 0; | |
} | |
.justified-list li { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
list-style-image: none; | |
display: inline-block; | |
vertical-align: middle; | |
*vertical-align: auto; | |
*zoom: 1; | |
*display: inline; | |
} | |
.justified-list li { | |
background: hotpink; | |
color: white; | |
font-family: sans-serif; | |
} |
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
<div class="container"> | |
<ul class="justified-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="bullets"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="no-bullets"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="horizontal-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="inline-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="delimited-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
<ul class="inline-block-list"> | |
<li>Apples</li> | |
<li>Oranges</li> | |
<li>Pears</li> | |
<li>Bananas</li> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment