[csswg-drafts] [css-syntax][css-transforms] NaN and Infinity in 'transform'

zcorpan has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-syntax][css-transforms] NaN and Infinity in 'transform' ==
See https://github.com/w3c/fxtf-drafts/issues/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.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1343 using your GitHub account

Received on Tuesday, 9 May 2017 21:47:26 UTC