Created
July 31, 2017 18:31
-
-
Save morningtoast/9327c0c0ba49b34c6a30015d4709281d to your computer and use it in GitHub Desktop.
External link indicator with CSS
This file contains hidden or 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
| body {margin: 1em;} | |
| a, a:visited { color: blue; | |
| text-decoration: none;} | |
| a:hover { | |
| border-bottom: 1px solid; | |
| } | |
| a[href*="//"]:not([href*="codepen.io"]) { | |
| /* external link styles, use :before or :after if you want! */ | |
| color: coral; | |
| &:after { | |
| content: "\2192"; | |
| font-size: 0.6em; | |
| vertical-align: super; | |
| margin-left: -0.1em; | |
| display: inline-block; | |
| position: relative; | |
| transform: rotate(-45deg) scale(1, 1); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source from: https://codepen.io/justincavery/pen/rwPpbP
Character codes: https://brajeshwar.github.io/entities/