|
|
|
|
|
by chrismorgan
956 days ago
|
|
> I'm so used to links not being underlined Here’s a user stylesheet I’ve been using for 2½ years (when color-mix() landed behind a pref in Firefox Nightly!): :any-link {
text-decoration: underline color-mix(in srgb, currentcolor 30%, transparent) !important;
}
:any-link:is(:hover, :active, :focus) {
text-decoration: underline !important;
}
This means links get a semitransparent underline normally, and full-opacity on hover. I reckon it’s an excellent balance. Occasionally you’ll get double underlining due to people using border-bottom instead of text-decoration for some unfathomable reason, and occasionally there’ll be link-styled buttons that won’t get this underline, but all up I’ve found it pretty good as an intervention.(I’ve been using this technique on websites I make since 2019, though I haven’t yet had the opportunity to use color-mix() on a public site, which only stabilised in browsers 6–11 months ago. My preferred technique there will be `:any-link:where(:not(:hover, :active, :focus)) { text-decoration-color: color-mix(in srgb, currentcolor 30%, transparent); }`.) |
|
Question: why would you prefer the latter technique on public sites, vs what's in your user stylesheet?