Skip to content

[css-syntax][css-transforms] NaN and Infinity in 'transform' #1343

@zcorpan

Description

@zcorpan

See w3c/fxtf-drafts#120

The DOMMatrix API uses unrestricted double IDL type for its attributes, which can use NaN, -Infinity, Infinity. Then matrix.toString() might return e.g. "matrix(Infinity, 0, 0, NaN, 0, 0)". And that fails to parse when passed to new DOMMatrix() constructor since Infinity and NaN are invalid CSS keywords.

Why not add those keywords to CSS (and a new value type like <unrestricted-number>)? They could still be invalid for everything other than 'transform' or some select places where they could make sense.

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