Re: [csswg-drafts] [css-syntax] numeric separators (#9293)

`0b…`, `0o…`, `0x…` and `…n` from the quoted JS justification for a group divider are not relevant number syntaxes in CSS, except if this core change would mean that sRGB colors could and would also be written as `#1_2_3`, `#1_2_3_F`, `#11_22_33`, `#11_22_33_FF`.

If long runs of decimal digits were an issue in CSS, I’d expect this to be fixed by introducing a new, better suited unit, which is a concept JS does not have (yet). The entire use case seems to be ”JS syntax compatibility for copy-pasting bare numbers“, when bare numbers are hardly used in CSS and a lot of JS’s number formats are not supported in CSS. 

On the other hand, `pirad` or just `pi` never was added as a unit, so making numeric values easy to parse for human authors clearly is no priority for CSS (anymore).

Just to be clear, digit grouping is a good thing per se, I’m just not convinced that making breaking changes to the core grammar is sufficiently justified by ”JS has this“, especially since other, non-breaking changes with the same underlying intention (i.e. more units) have been regularly rejected. 

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


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

Received on Tuesday, 5 September 2023 05:37:08 UTC