- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 26 Apr 2023 16:56:06 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[cssom] Serialize numbers using scientific notation?`, and agreed to the following: * `RESOLVED: Accept proposal to match JS scinot serialization triggers, other than 6-digit decimal truncation rule` <details><summary>The full IRC log of that discussion</summary> <fantasai> TabAtkins: our rules for serializing numbers are reasonably well-defined<br> <fantasai> TabAtkins: But we have scientific notation now, which is widely implemented<br> <fantasai> TabAtkins: Browsers use it for serialization *sometimes*, inconsistent, depends on the property...<br> <fantasai> TabAtkins: So the proposal here is to formalize when we serialize as scinot<br> <fantasai> TabAtkins: My proposal is to match JS exactly, which means that you use scinot whenever either the number has 22 or more digits of integer value, or has 6 or more leading zeroes in its decimal portion and is zero integer<br> <fantasai> TabAtkins: only change from JS is that we continue to truncate to only 6 digits after decimal point, maximum<br> <fantasai> TabAtkins: this is required for compat<br> <fantasai> TabAtkins: and also it hides some differences between browsers/properties<br> <fantasai> TabAtkins: and it also hides some floating-point variances<br> <fantasai> TabAtkins: so there's spec text in the issue<br> <fantasai> TabAtkins: and that's it<br> <bkardell_> do we have numbers that big?<br> <fantasai> TabAtkins: Wrt interop, we're all over the place<br> <fantasai> TabAtkins: every property and every browser does an effectively random thing<br> <fantasai> TabAtkins: partially due to different levels of precision, e.g. width supports subpixel, but scale property supports ...<br> <fantasai> TabAtkins: e.g. Chrome start scinot at 0.0001<br> <fantasai> TabAtkins: So no interop, so match JS with wrinkle about 6 digits seems reasonable to do with minimal impact on authors<br> <fantasai> Rossen_: Any additional comments?<br> <fantasai> TabAtkins: dbaron's point was to bias towards older formats during serialization<br> <fantasai> ... that's part of why the bounds are so wide<br> <fantasai> ... Most numbers you will ever encounter in a stylesheet do not trigger scinot<br> <fantasai> TabAtkins: but outside those bounds, e.g. when serializing a transform matrix, need to serialize somehow<br> <fantasai> Rossen_: Pretty clear proposal, not seeing anyone rushing to the queue ...<br> <fantasai> ... any objections to the proposal?<br> <fantasai> RESOLVED: Accept proposal to match JS scinot serialization triggers, other than 6-digit decimal truncation rule<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8538#issuecomment-1523755872 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 26 April 2023 16:56:08 UTC