Re: [csswg-drafts] [cssom] Serialize numbers using scientific notation? (#8538)

For what it's worth, one principle of serialization that I think we documented somewhere (but I can't find it anywhere that's general, although it's documented in a more specific case for [serializing CSS values](https://www.w3.org/TR/cssom/#serializing-css-values)) is that serializing should generally prefer serializing to the more backwards-compatible / older form when there are different serialization possibilities that have been part of CSS for different amounts of time.  This preference is both (a) because older web content might expect that and (b) because serialized content might be sent to a different user agent with different capabilities.  (Though (b) is probably less of an issue these days because of faster browser release cycles and faster uptake of those releases.)

Following this principle here would mean not using scientific notation, or at least mean limiting its use to cases where non-use is problematic (for example, because it breaks other serialization principles such as lack of dataloss during a round-trip through parsing and serialization... though I'm not sure that's the case here).

That said, if we agree that (b) is less important these days, then I think this principle just degrades to the caution that we have whenever making non-backwards-compatible changes.

-- 
GitHub Notification of comment by dbaron
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8538#issuecomment-1523637966 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 15:40:53 UTC