Skip to content

[css-text-decor] Limits on text-underline-offset to preserve semantic meaning #4059

Description

@litherum

If an author puts text-underline-offset on an underline in a naive implementation, they could potentially make the underline look like a strikethrough. When this content is viewed on an older browser that doesn't support text-underline-offset, the semantic meaning of the text will appear to be changed (from struck-through to underlined). This is unfortunate. Instead, implementations should try to restrict the offsets on underlines so the underline always looks like an underline, rather than a strikethrough or overline.

There are a few questions to designing this:

  1. Should the specification prescribe specific rules about where these limits are, or should the spec simply say that implementations should attempt to solve this problem?
  2. Regardless of the result of 1, the spec should probably at least suggest some rules. So, what should the suggested rules be?
    1. The close-edge boundary for horizontal Latin text should probably be the baseline.
    2. What about Hindi text, that uses a hanging baseline?
    3. What about vertical text, where the baseline is at the same place a strikethrough should be?
    4. The underline is supposed to be one consistent stroke, regardless of the presence of child elements of differing sizes. Should a super large font-size child element push the limit outward?
    5. How about the other direction; the underline of one line of text shouldn't be able to look like an overline on the next line of text. For simple paragraphs this is probably straightforward, but what about when various elements on the next line have differing line-heights? Different sizes?
    6. Do we take in the border box of the containing block into account?

Metadata

Metadata

Assignees

No one assigned

    Labels

    css-text-decor-4i18n-ilreqIndic language enablementi18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions