Re: [csswg-drafts] Rethinking text-underline-offset

Hi! I think you're a bit confused. :)

> text-underline-offset is meant to be a delta added to wherever the underline happened to be placed, but the location where the underline is placed varies between different browsers and operating systems.

`text-underline-offset` is defined to set “the offset of underlines from their initial position” where the “initial position” is defined in the table below. It is not up to the UA, that is what the `auto` value means. Zero sets the underline at exactly that position.

> What does it mean if both text-underline-offset: from-font and text-underline-position: under are applied to the same element? Such a formulation seems fairly meaningless.

Good question. `from-font` should probably resolve to zero in this case.

<hr>

> Add another value to text-underline-position named something like standard.

I'm not convinced this is necessary if we address your other issues... but open to hearing your arguments. :)

> Move the from-font value from text-underline-offset to text-underline-position.

`text-underline-position` is more fundamental positioning--it can swap which side of the text the underline is on, etc.; `from-font` is really about just adjusting the offset, so I think it really does belong here.

> While we're at it, text-underline-offset should be able to take a percentage, which gets multiplied by the font size.

This is a severe oversight and we should definitely fix it. We should maybe try to be consistent about this across this property, `letter-spacing` and `word-spacing` (https://github.com/w3c/csswg-drafts/issues/2165), and ideally, `line-height`... Maybe in a separate issue, though?

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

Received on Sunday, 16 September 2018 12:41:36 UTC