Skip to content

Instantly share code, notes, and snippets.

@liz282907
Created July 3, 2018 03:11
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 liz282907/d9c7d2bd30d3eec8ec7e8fd822909822 to your computer and use it in GitHub Desktop.
Save liz282907/d9c7d2bd30d3eec8ec7e8fd822909822 to your computer and use it in GitHub Desktop.
Custom underlines
/**
* Custom underlines
*/
body {
font: 250%/1.6 Baskerville, Palatino, serif;
}
a {
background: linear-gradient(gray, gray) no-repeat;
background-size: 100% 1px;
background-position: 0 1.02em;
text-shadow: .05em 0 white, -.05em 0 white;
}
p:nth-child(2) a {
background: linear-gradient(90deg, gray 66%, transparent 0) repeat-x;
background-size: .2em 2px;
background-position: 0 1em;
}
<p>“The only way to <a>get rid of a temp­ta­tion</a> is to <a>yield</a> to it.”</p>
<p>“The only way to <a>get rid of a temp­ta­tion</a> is to <a>yield</a> to it.”</p>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment