Skip to content

[css-text-decor] Conflicting descriptions of text-underline-position: left or right in horizontal typographic mode #4656

@jfkthame

Description

@jfkthame

I'm unclear exactly how to handle the text-underline-position property in horizontal typographic mode, when only one of the values left or right is specified.

Given for example text-underline-position: left and horizontal English text, where should the underline appear -- close to the alphabetic baseline, or at the bottom of the em box?

There seem to be two relevant statements in the spec, but as I read it, they conflict with each other.

First, we read (just below Example 4):

If left or right is specified alone, auto is also implied.

This seems to mean that the underline would typically appear close below the alphabetic baseline of the horizontal text, just as if the property were auto. This also seems consistent with the descriptions of the left and right values, which refer only to an effect in vertical typographic modes.

However, at the end of the section there is a illustration showing the effect of left and right (in vertical mode), and the caption of this illustration says:

In vertical typographic modes, the text-underline-position values left and right allow placing the underline on either side of the text. (In horizontal typographic modes, both values are treated as under.)

(my emphasis)

This seems to be saying that either left or right, alone, would have the same effect as under in horizontal mode, and so the underline would appear at the bottom of the em box.

Which should it be?

AFAICT, current implementations behave according to the first description above. If this is correct, I suggest the caption of that illustration should be changed to read:

(In horizontal typographic modes, both values are treated as auto.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions