Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-values-3] 4.3 Real numbers incorrectly summarizes allowed values #7248

Closed
tshinnic opened this issue May 3, 2022 · 1 comment
Closed

Comments

@tshinnic
Copy link

tshinnic commented May 3, 2022

Once again I was trying to find the definition for SVG real numbers and the chain of refs led me to CSS Syntax. Specifically I was trying to find the 'rightness' of an emitted "9e-5" or "-1e-4".

Referred to section 4.3. Real Numbers: the <number> type from the SVG spec, I followed the <number-token> link to CSS-Syntax-3. Finding the familiar railroad diagram I was reassured that "9e-5" was legal.

But then when I returned to CSS Values and read the description of valid values, it seems to only allow "1.0e1" and not "1e1". The prose requires a '.' decimal point in order to specify an exponent.

Or... was "and optionally an exponent" supposed to also apply to the much earlier "an integer"? As written this section seems very ambiguous to this easily-shaken reader.

@tabatkins
Copy link
Member

The prose there is descriptive, not normative; CSS Syntax defines how parsing works, and 1e2 is definitely allowed. (The railroad diagrams are also descriptive, not normative, but they match the parsing algo.)

That said, the V&U text is indeed written confusingly and should be adjusted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants