Skip to content

Instantly share code, notes, and snippets.

@nkt
Created October 14, 2015 09:59
Show Gist options
  • Save nkt/23c65dcd84e0e1e4e582 to your computer and use it in GitHub Desktop.
Save nkt/23c65dcd84e0e1e4e582 to your computer and use it in GitHub Desktop.
.ribbon {
font-size: 16px !important;
width: 50%;
position: relative;
background: @brand-primary;
color: #fff;
text-align: center;
padding: 1em 2em;
margin: 0 auto;
&:before, &:after {
content: "";
position: absolute;
display: block;
bottom: -1em;
border: 1.9em solid darken(@brand-primary, 10%);
z-index: -1;
}
&:before {
left: -2.37em;
border-right-width: 1.5em;
border-left-color: transparent;
}
&:after {
right: -2.37em;
border-left-width: 1.5em;
border-right-color: transparent;
}
&.hide-edges:before, &.hide-edges:after {
display: none;
}
.ribbon-content {
font-size: @ribbon-content-font-size;
&:before, &:after {
content: "";
position: absolute;
display: block;
border-style: solid;
border-color: darken(@brand-primary, 20%) transparent transparent transparent;
bottom: -1em;
}
&:before {
left: 0;
border-width: 1em 0 0 1em;
}
&:after {
right: 0;
border-width: 1em 1em 0 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment