W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2017

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

From: Simon Pieters via GitHub <sysbot+gh@w3.org>
Date: Tue, 09 May 2017 21:47:20 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-227508133-1494366438-sysbot+gh@w3.org>
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 &lt;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

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 10:12:53 UTC