Skip to content

Instantly share code, notes, and snippets.

@csswizardry
Created December 16, 2015 08:48
Show Gist options
  • Save csswizardry/e368a922697ba8eade6d to your computer and use it in GitHub Desktop.
Save csswizardry/e368a922697ba8eade6d to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<ol class="c-breadcrumb">
<li class="c-breadcrumb__item"><a href="#0" class="c-breadcrumb__link">Home</a></li>
<li class="c-breadcrumb__item"><a href="#0" class="c-breadcrumb__link">About</a></li>
<li class="c-breadcrumb__item"><strong class="c-breadcrumb__current">Products</strong></li>
</ol>
// ----
// Sass (v3.4.20)
// Compass (v1.0.3)
// ----
$color: #1b78cc;
html {
font: menu;
font-size: 12px;
line-height: 1.5;
}
a {
color: $color;
text-decoration: none;
&:hover,
&:focus {
text-decoration: underline;
}
}
$breadcrumb-delim: "/";
.c-breadcrumb {
margin: 0;
padding: 0;
list-style: none;
}
.c-breadcrumb__item {
display: inline-block;
+ #{&} {
margin-left: 9px;
&:before {
content: "#{$breadcrumb-delim} ";
display: inline-block;
margin-right: 9px;
}
}
}
html {
font: menu;
font-size: 12px;
line-height: 1.5;
}
a {
color: #1b78cc;
text-decoration: none;
}
a:hover, a:focus {
text-decoration: underline;
}
.c-breadcrumb {
margin: 0;
padding: 0;
list-style: none;
}
.c-breadcrumb__item {
display: inline-block;
}
.c-breadcrumb__item + .c-breadcrumb__item {
margin-left: 9px;
}
.c-breadcrumb__item + .c-breadcrumb__item:before {
content: "/ ";
display: inline-block;
margin-right: 9px;
}
<ol class="c-breadcrumb">
<li class="c-breadcrumb__item"><a href="#0" class="c-breadcrumb__link">Home</a></li>
<li class="c-breadcrumb__item"><a href="#0" class="c-breadcrumb__link">About</a></li>
<li class="c-breadcrumb__item"><strong class="c-breadcrumb__current">Products</strong></li>
</ol>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment