You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-transforms-2] clamping of perspective() function should affect resolved value of transform #6346
Like #6320, this is a followup to the resolution in #413. It also depends on #4869 since the relevant piece of the spec isn't in great shape.
In #413 the group resolved that values less than 1px in the perspective() transform function should be clamped to a minimum of 1px. It was described there as a "render time clamp".
However, the resolved value of transform is (interoperably, I think) a matrix() or matrix3d() value. If perspective(0) is put in the matrix without the clamping, we'd need to figure out how to represent infinity in the matrix. While there are, in theory, ways we could do this (like calc(-1/0), it's not clear that those ways are actually reliably supported across engines. It seems both easier and more useful to produce the matrix that would actually be used at render time, but applying the clamping when producing the resolved value.
So I'd like to propose that the clamping of perspective() also apply to the resolved value.
Activity
Correct handling of [0px,1px) values of perspective and perspective().
Correct handling of [0px,1px) values of perspective and perspective().
Correct handling of [0px,1px) values of perspective and perspective().
Correct handling of [0px,1px) values of perspective and perspective().
Correct handling of [0px,1px) values of perspective and perspective().
Correct handling of [0px,1px) values of perspective and perspective().
Bug 1713961 [wpt PR 29175] - Correct handling of [0px,1px) values of …
Bug 1713961 [wpt PR 29175] - Correct handling of [0px,1px) values of …
astearns commentedon Jun 16, 2021
RESOLVED: clamp to 1px for both getComputedStyle() and interpolation as well in #6320