Skip to content

Instantly share code, notes, and snippets.

@gijsroge
Last active October 11, 2022 15:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gijsroge/ecf4e799784259ddb958ebf20e4c9128 to your computer and use it in GitHub Desktop.
Save gijsroge/ecf4e799784259ddb958ebf20e4c9128 to your computer and use it in GitHub Desktop.
Untitled
:root{
max-width: 50rem;
margin: 0 auto;
font-size: 200%;
line-height: 1.5;
padding: 0 2rem;
}
a{
text-decoration: none;
}
.without-pseudo{
background-image: linear-gradient(transparent 50%, currentColor 50%); /* no transparency :(*/
background-repeat: repeat-x;
background-position: 0 100%;
background-size: 1px 2px;
}
.with-pseudo{
position: relative;
}
.with-pseudo::after{
content:'';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(transparent 50%, currentColor 50%);
background-repeat: repeat-x;
background-position: 0 100%;
background-size: 1px 2px;
opacity: .2;
}
<p>Lorem ipsum <a class="without-pseudo" href="#">test link multiline sit amet, consectetur adipisicing elit.</a> Nisi suscipit expedita distinctio maxime, ex, similique officia dolores laudantium maiores laboriosam, assumenda at beatae animi nostrum odio amet ut perspiciatis atque!</p>
<hr />
<p>Lorem ipsum <a class="with-pseudo" href="#">test link multiline sit amet, consectetur adipisicing elit.</a> Nisi suscipit expedita distinctio maxime, ex, similique officia dolores laudantium maiores laboriosam, assumenda at beatae animi nostrum odio amet ut perspiciatis atque!</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