Skip to content

[css-text-decor-4] Computed value of text-decoration-thickness #10044

Closed

Description

@jfkthame

According to the current draft, the computed value of text-decoration-thickness is "specified keyword or absolute length", which implies that percentages must be resolved to lengths in the computed value.

This seems to be at odds with the note just below, which says that

A percentage will inherit as a relative value, and will therefore scale with changes in the font as it inherits.

If percentages were retained in the computed value, this would occur naturally, but with the computed value being an absolute length, inheritance seems to be a special case.

So was the definition of the computed value just overlooked when adding percentage support? AFAICS the current WPT test at https://wpt.live/css/css-text-decor/text-decoration-thickness-computed.html expects to see percentages retained.

On the other hand, there's an animation test at https://wpt.live/css/css-text-decor/animations/text-decoration-thickness-interpolation.html that expects to see percentages resolved to absolute px lengths. If the computed-value test is correct and percentages should be retained, then shouldn't they also be interpolated as such?

Activity

  1. fantasai commented on Mar 8, 2024

    @fantasai
    Collaborator

    Fixed, thanks!

  2. jfkthame commented on Mar 8, 2024

    @jfkthame
    ContributorAuthor

    Thanks. Does it follow that the animation test at https://wpt.live/css/css-text-decor/animations/text-decoration-thickness-interpolation.html is incorrect, and should expect to see percentage values (when interpolating between percentages)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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