Skip to content

Instantly share code, notes, and snippets.

@sa1f
Created July 16, 2012 00:23
Show Gist options
  • Select an option

  • Save sa1f/3119362 to your computer and use it in GitHub Desktop.

Select an option

Save sa1f/3119362 to your computer and use it in GitHub Desktop.
Create pixelated corners in unit-list
ul li {
list-style: none;
}
.unit-list {
border:5px solid #ababab;
background-color:#fff;
}
.unit-list li {
position:relative;
padding:10px 10px;
border-bottom:2px solid #ababab;
font-weight:bold;
}
/* Create pixelated corners in unit-list */
ul {
display:inline-block;
}
.unit-list > li:first-of-type {
background-color:#fff;
border-top:5px solid #ababab;
margin-top:-4px;
padding-top:6px;
}
.unit-list > li:last-of-type {
margin-bottom:-4px;
background-color:#fff;
padding-bottom:8px;
}
.unit-list > li:first-of-type:before,
.unit-list > li:last-of-type:after {
content:'';
position:absolute;
left:2px;
right:2px;
display:block;
height:2px;
background-color:#fff;
}
.unit-list > li:first-of-type:before {
top:-4px;
border-top:5px solid #ababab;
}
.unit-list > li:last-of-type:after {
bottom:-4px;
border-bottom:5px solid #ababab;
}
<ul class="unit-list">
<li>A list item</li>
<li>This is something else</li>
<li>Word</li>
</ul>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment