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

Wrong expectations for percentage interpolation in text-decoration-thickness-interpolation.html #45013

Open
jfkthame opened this issue Mar 9, 2024 · 0 comments

Comments

@jfkthame
Copy link
Contributor

jfkthame commented Mar 9, 2024

This test, added in 708e132, includes examples of interpolating text-decoration-thickness involving percentage values.

The test appears to expect all the percentages to be resolved to absolute pixel dimensions, but AFAICT this is incorrect. When interpolating between percentage values, the result should also be computed as a percentage; and when interpolating between a mix of length and percentage, the spec calls for:

...converting both values into a calc() expression representing the sum of the dimension type and a percentage (each possibly zero) and interpolating each component individually...

So it seems wrong to expect all the interpolations involving percentages to resolve to absolute dimensions.

This is currently resulting in a bunch of "failures" in Firefox of the form

CSS Transitions: property from [100%] to [0%] at (0) should be [16px]

and so on, where Firefox (correctly, I think) returns 100%, not 16px.

https://drafts.csswg.org/css-text-decor-4/#text-decoration-thickness-property
https://drafts.csswg.org/css-values-4/#combine-mixed

cc @shivamidow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant