Skip to content

[css-transforms-2] clamping of perspective() function should affect resolved value of transform #6346

Closed

Description

@dbaron

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

  1. self-assigned this
    on Jun 3, 2021
  2. astearns commented on Jun 16, 2021

    @astearns
    Member

    RESOLVED: clamp to 1px for both getComputedStyle() and interpolation as well in #6320

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions