Open BorisChiou opened 6 years ago
(Please don't post a nonsense then edit it to a real issue, because GitHub doesn't send edited version to email notifications, and thus this kind of behavior may cause confusion to people reading emails first. If you open an issue bug forget to fill the description, just close it and open a new one. If you are going to add any nontrivial information, please use comment, or comment then remove. This would also give the information a chance to be backed up in W3C-hosting mailing list.)
Sorry for this. I didn't notice the problem of W3C mailing list.
For example, flex-grow / flex-shrink in Firefox:
document.body.style.flexGrow = "6.78e+8";
document.body.style.flexGrow // "678000000"
getComputedStyle(document.body).flexGrow // "6.78e+8"
That's probably because gCS result here is serialized by C++ code, while specified value is by Servo. Maybe at some point we can solely use the Rust code and remove the C++ one...
In [1], the serialization of scientific notation for
<number>
, it says: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.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 of3.40282e+38
, because shorter serialization is preferred.)[1] https://drafts.csswg.org/cssom/#serializing-css-values