Skip to content

Instantly share code, notes, and snippets.

@t32k
Last active December 11, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t32k/4593169 to your computer and use it in GitHub Desktop.
Save t32k/4593169 to your computer and use it in GitHub Desktop.
Cancellation of last item border.
<ul class="listview has-line">
<li>foo</li>
<li>bar</li>
<li>baz</li> <!-- want to cancell this border -->
</ul>
.listview li {
border-bottom: 1px #ede8e0 solid;
@include box-shadow(#fff 0 1px 0 0);
}
// @extend pattern
%cancell-border {
border: 0;
@include box-shadow(none);
}
.listview li:last-child {
@extend %cancell-border;
}
// HTML class attribute pattern
.has-line > li:last-child {
border: 0;
@include box-shadow(none);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment