Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jensgro
Last active May 11, 2016 12:56
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 jensgro/9c6015117f0e1c8c2522 to your computer and use it in GitHub Desktop.
Save jensgro/9c6015117f0e1c8c2522 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<ul class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Level 1</a></li>
<li><a href="#">One Level deeper</a></li>
<li><a href="#">Deepest Level</a></li>
</ul>
// ----
// libsass (v3.3.6)
// ----
@mixin hornav {
list-style-type: none;
&, li {
margin-left: 0;
padding-left: 0;
}
li {
display: inline-block;
}
}
@mixin before-after($border-width: 10px) {
content: "";
display: block;
width: 0;
height: 0;
border: $border-width solid transparent;
position: absolute;
}
.breadcrumb {
@include hornav;
}
.breadcrumb a {
padding-left: 15px;
position: relative;
margin-left: 10px;
}
.breadcrumb a:before {
@include before-after(5px);
border-left-color: #000;
left: 0;
top: 5px;
}
.breadcrumb {
li {
&:first-child {
a {
margin-left: 0;
&:before {
display: none;
}
}
}
}
}
.breadcrumb {
list-style-type: none;
}
.breadcrumb, .breadcrumb li {
margin-left: 0;
padding-left: 0;
}
.breadcrumb li {
display: inline-block;
}
.breadcrumb a {
padding-left: 15px;
position: relative;
margin-left: 10px;
}
.breadcrumb a:before {
content: "";
display: block;
width: 0;
height: 0;
border: 5px solid transparent;
position: absolute;
border-left-color: #000;
left: 0;
top: 5px;
}
.breadcrumb li:first-child a {
margin-left: 0;
}
.breadcrumb li:first-child a:before {
display: none;
}
<ul class="breadcrumb">
<li><a href="#">Home</a></li>
<li><a href="#">Level 1</a></li>
<li><a href="#">One Level deeper</a></li>
<li><a href="#">Deepest Level</a></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment