Skip to content

Instantly share code, notes, and snippets.

@xeor
Created January 9, 2015 22:59
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 xeor/285f3a0d56d3ff93a558 to your computer and use it in GitHub Desktop.
Save xeor/285f3a0d56d3ff93a558 to your computer and use it in GitHub Desktop.
breadcrumb.scss
$breadcrumb-color: rgb(70, 70, 90);
$breadcrumb-lighten-by: 8;
.breadcrumb {
font: 18px Helvetica, Arial, Sans-Serif;
list-style: none;
overflow: hidden;
li {
float: left;
@for $i from 1 through 10 {
&:nth-child(#{$i}) a {
background: lighten($breadcrumb-color, $breadcrumb-lighten-by*$i);
&:after {
border-left-color: lighten($breadcrumb-color, $breadcrumb-lighten-by*$i);
}
}
}
&:first-child a {
padding-left: 10px;
}
&:last-child {
background: transparent !important;
color: #000;
cursor: default;
padding: 15px 0 10px 55px;
pointer-events: none;
}
a {
color: #fff;
display: block;
float: left;
padding: 15px 0 10px 50px;
position: relative;
text-decoration: none;
&:after {
border-bottom: 50px solid transparent;
border-left: 30px solid transparent;
border-top: 50px solid transparent;
content: ' ';
display: block;
height: 0;
left: 100%;
margin-top: -50px;
position: absolute;
top: 50%;
width: 0;
z-index: 2;
}
&:before {
border-bottom: 50px solid transparent;
border-left: 30px solid #fff;
border-top: 50px solid transparent;
content: ' ';
display: block;
height: 0;
left: 100%;
margin-left: 1px;
margin-top: -50px;
position: absolute;
top: 50%;
width: 0;
z-index: 1;
}
&:hover {
background: darken($breadcrumb-color, 2);
&:after {
border-left-color: darken($breadcrumb-color, 2) !important;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment