Re: [csswg-drafts] [cssom] Serialization of large numbers should use scientific notation (#6471)

I guess limiting to 6 significant digits is ok since no more than 6 decimal places are produced, except in the last case below where *an integer in the millions shouldn't start rounding off its lower integer digits*, which is an actual browser bug.

| line-height | style Chrome | style Firefox | +n.toFixed(6) | +n.toPrecision(6) | 
| ----------- | ------------ | ------------- | ------------- | ----------------- |
| 1e-6        | 1e-06        | 0.000001      | 0.000001      | 0.000001          |
| 1e-7        | 1e-07        | 1e-7          | 0             | 1e-7              |
| 0.123456    | 0.123456     | 0.123456      | 0.123456      | 0.123456          |
| 0.1234567   | 0.123457     | 0.123457      | 0.123457      | 0.123457          |
| 123456.7    | 123457       | 123457        | 123456.7      | 123457            |
| 999999      | 999999       | 999999        | 999999        | 999999            |
| 1e6         | 1e+06        | 1000000       | 1000000       | 1000000           |
| 1234567     | 1.23457e+06  | 1234570       | 1234567       | 1234570           |

-- 
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6471#issuecomment-1147064359 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 6 June 2022 05:33:45 UTC