W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2018

Re: [csswg-drafts] [cssom] How should extremely small <number>s be serialized?

From: Chris Nardi via GitHub <sysbot+gh@w3.org>
Date: Wed, 21 Feb 2018 19:03:49 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-367434501-1519239823-sysbot+gh@w3.org>
`<integer>`s should never be serialized with scientific notation according to the current text, as all it says is:

> A base-ten integer using digits 0-9 (U+0030 to U+0039) in the shortest form possible, preceded by "-" (U+002D) if it is negative.

The only part that this leaves open is for other types e.g. `<length>`s, in which the spec says that they should be serialized as `<number>`s. Perhaps the spec could state that only `<number>`s that are smaller than `1e-6` (e.g. would round to `0` if attempted to be serialized per current rules`) can be serialized in scientific notation? I'm not sure what a good solution would be.

GitHub Notification of comment by csnardi
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2330#issuecomment-367434501 using your GitHub account
Received on Wednesday, 21 February 2018 19:04:49 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:24 UTC