Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jfkthame opened this issue Mar 7, 2024 · 3 comments
Closed

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

jfkthame opened this issue Mar 7, 2024 · 3 comments

Comments

@jfkthame
Copy link
Contributor

jfkthame commented Mar 7, 2024

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?

@Loirooriol
Copy link
Contributor

@fantasai
Copy link
Collaborator

fantasai commented Mar 8, 2024

Fixed, thanks!

@jfkthame
Copy link
Contributor Author

jfkthame commented Mar 8, 2024

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
Projects
None yet
Development

No branches or pull requests

3 participants