Created
November 8, 2012 08:59
-
-
Save hendriklammers/4037649 to your computer and use it in GitHub Desktop.
Sass: underline mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Replace default underline on a link with a bottom border */ | |
@mixin underline($color, $width: 1px) { | |
text-decoration: none; | |
display: block-inline; | |
position: relative; | |
&:before { | |
content: ''; | |
display: block-inline; | |
position: absolute; | |
left: 0; | |
width: 100%; | |
height: 1em; | |
margin-top: 0.3em; | |
border-bottom: $width solid $color; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment