Link underlines: how do you tune thickness and offset so they don't collide with descenders?
Default browser underlines often slice right through the g, p and y. Modern CSS gives you text-decoration-thickness, text-underline-offset and text-decoration-skip-ink, which make a big difference.
My current setup for body links is a slightly thinner line, an offset of around 0.15em, and skip-ink left on auto. On hover I thicken it rather than changing colour.
What values do you use? Do you change them per typeface, since x-height and descender length vary so much?
Comments · 3
text-decoration-skip-ink: auto is the key one. It breaks the line around descenders. Then adjust text-underline-offset to taste.
I set thickness in em units so the underline scales with font size. 0.08em with a 0.15em offset is a decent start.
Do any browsers handle skip-ink differently? Worth testing in Safari too?