Skip to content

[css-transforms] Error in description of transform in Section 3 example 5 #4767

Open

Description

@KenBallou

https://www.w3.org/TR/css-transforms-1/

In example 5 of section 3, the first paragraph under the CSS snippet reads "The visual appareance is as if the div element gets translated by 80px to the bottom left direction, then scaled up by 150% and finally rotated by 45°." In addition to the misspelling of "appearance", the

element gets translated by 80px to the bottom right direction. (The diagram underneath the text is correct.)

Activity

  1. afdw commented on Oct 31, 2020

    @afdw
    Contributor

    Moreover, this seems to be incorrect:

    Each <transform-function> can get represented by a corresponding 4x4 matrix. To map a point from the coordinate space of the <div> box to the coordinate space of the parent element, these transforms get multiplied in the reverse order:

    1. The rotation matrix gets post-multiplied by the scale matrix.
    2. The result of the previous multiplication is then post-multiplied by the translation matrix to create the accumulated transformation matrix.
    3. Finally, the point to map gets pre-multiplied with the accumulated transformation matrix.

    As far as I understand, it means that the resulting formula of the above procedure is:

    pparent = Mrotation × Mscale× Mtranslation × plocal

    But the rest of the specification and the Example 1 in particular seems to imply that the formula actually is:

    pparent = Mtranslation × Mscale× Mrotation × plocal

    Am I getting something wrong or is the example really incorrect?

  2. added a commit that references this issue on Oct 31, 2020
    2691b4b
  3. JimJJewett commented on Oct 30, 2024

    @JimJJewett

    Is there a new TR (or even CR) expected at some point to fix this? Starting at https://www.w3.org/TR/css-transforms-1/ it looks like the latest published version is a Candidate Recommendation is from 20190214, and even the latest editors' draft (August 7, 2023) still has Example 5 claiming that "The visual appearance is as if the div element gets translated by 80px to the bottom left direction,"

    I wondered if the perspective were some equivalent of stage-left, from within the screen.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions