- From: Boris via GitHub <sysbot+gh@w3.org>
- Date: Sun, 04 Nov 2018 17:43:39 +0000
- To: public-css-archive@w3.org
Updated description:
In [1], the serialization of scientific notation for `<number>`, it says:
> A base-ten number using digits 0-9 (U+0030 to U+0039) in the shortest form possible, using "." to separate decimals (if any), rounding the value if necessary to not produce more than 6 decimals, preceded by "-" (U+002D) if it is negative.
> Note: scientific notation is not used.
I think this is a little bit ambiguous for scientific notation. For a very long number, like a max float (`3.40282e+38`), all the browsers (i.e. Chrome, Firefox, Safari) still serialize the scientific notation.
e.g.
```
div {
animation-timing-function: cubic-bezier(0, 3.40282e+38, 0, 0);
}
console.log(window.getComputedStyle(div).animationTimingFunction); // the output is "cubic-bezier(0, 3.40282e+38, 0, 0)" in all the browsers.
```
Just want to know should we update the spec or all the implementations of browser are incorrect?
Besides, if we want to update the spec, should we use "+" sign in scientific notation? (i.e. Use `3.40282e38`, instead of `3.40282e+38`, because shorter serialization is preferred.)
[1] https://drafts.csswg.org/cssom/#serializing-css-values
--
GitHub Notification of comment by BorisChiou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3276#issuecomment-435690114 using your GitHub account
Received on Sunday, 4 November 2018 17:43:41 UTC