Re: [csswg-drafts] [css-text-decor] Limits on text-underline-offset to preserve semantic meaning (#4059)

I agree that 1-4 in Jen's samples are all valid underline styles. Yes, the position in 3 & 4 overlaps the text, but it is clearly still near the baseline and there is sufficient color contrast between the text and underline that it doesn't look like a cross-out.

To cover these situations, we could define a clamp such that the mid-point of the under/over line is never moved inwards by more than ⅓ of the distance between the normal underline position & the normal overline position.

If we accept sample 5 as a valid underline, then we'd be basically giving up on the idea of clamping the values at all.  However, it's also not a valid strike-through text decoration (since that would be painted on top of the text).  So this effect would continue to be dependent on background gradients.  I'm OK with that; what I see when I look at it is text with a background effect. _But_, if authors are using it to have the same semantic meaning as an underline, then we have to consider that underlines are communicated to assistive tech & are preserved in simplified CSS environments, but background images are not.

Another use case to consider: animating this value.  If an author is trying to create an animated hover effect with the line sliding into position, then interpolating an offset length is much easier than trying to swap between underline, strike-through, and overline.  Which again would argue for no clamping.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4059#issuecomment-505967822 using your GitHub account

Received on Wednesday, 26 June 2019 17:20:27 UTC