Styling link underlines in 2023
levimcg.com·150w
Preview
Report Post

I remember years ago reading this article by Marcin Wichary about how they created custom link underlines at Medium using a lot of CSS trickery. I thought of it again when I was styling the links on my site and discovered all of the great link underline related CSS properties that have been well-supported since 2019! I’m not sure why, but I’ve totally missed all of these properties landing in browsers. Here’s and example.

a {
text-underline-offset: .25rem;
text-decoration-thickness: .25rem;
text-decoration-skip-ink: none;
text-decoration-color: #666;
}

With just a few lines of CSS you creates some really nice-looking link underlines. It’s a…

Similar Posts

Loading similar posts...