Created
October 16, 2015 18:53
-
-
Save brajeshwar/cb4c16eba797bf5ebbed to your computer and use it in GitHub Desktop.
OS X styled text decoration for web
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
a { | |
color: #0e58f5; | |
text-decoration: none; | |
background-image: linear-gradient(to bottom, transparent 50%, #709cf9 50%); | |
background-position: 0 99%; | |
background-repeat: repeat-x; | |
background-size: 100% 0.15rem; | |
text-shadow: 0.1rem 0 #fff, 0.15rem 0 #fff, -0.1rem 0 #fff, -0.15rem 0 #fff; | |
} | |
a:hover, a:active, a:focus { | |
color: #0b348b; | |
text-decoration: none; | |
background-image: linear-gradient(to bottom, transparent 50%, #1257ea 50%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Of course, this is the generated CSS. Sass does a much easier job with the background color, color functions can come in to do quite a bit of magic too. Finally, PostCSS can take care of the vendor prefixes.