Skip to content

[css-typed-om] CSSTransformComponent attributes are under- or incorrectly specced #1153

@AtkinsSJ

Description

@AtkinsSJ

Came across a couple of issues while implementing CSSTranslate, but they apply to others:

Many of these attributes' behaviour (for example the x/y/z attributes of CSSTranslate), are not specced at all.

Second, the spec for the x/y/z attributes on CSSRotate and CSSScale say:

The x, y, and z attributes must, on setting to a new value val, rectify a numberish value from val and set the corresponding internal slot to the result of that.

The WPT tests (eg https://wpt.live/css/css-typed-om/stylevalue-subclasses/cssTranslate.tentative.html) expect these to throw a TypeError if they are set to a value that does not match the expected numeric type, similar to the errors thrown in the constructor. This makes sense, but isn't mentioned in the spec.

EDIT: Removed what I said above about rectifying being a no-op, I didn't notice that CSSRotate's attributes are indeed CSSNumberish.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions