-
Notifications
You must be signed in to change notification settings - Fork 715
[css-syntax-3] Do not always parse a numeric expressed with scientific notation to a number #7289
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
Comments
5.2. Integers: the <integer> type and 5.3. Real Numbers: the <number> type in css-values are reasonably clear (when read together, at least) that scientific notation is allowed for |
Oh, that is right, thanks. Even just 5.3 is enough for me:
As noted, I can not say if it is mathematically correct but it is defined that numbers using the scientific notation are not integers in CSS. Do you think mathematical correctness does not matter and I can close this issue? |
See #6471 (comment) |
Yeah, closing this as essentially a dupe of #6471. I'm still open to amending Syntax to let |
I do not believe there are meaningfull cases that warrant a fix for the following, if it is an actual bug. My motivation for creating this issue is also to use it for code documentation. I have searched for existing issues with "scientific notation integer", with no success. I also searched for a WPT.
order: 1e0
is parsed as invalid in browsers becauseorder
should be an<integer>
.I do not have a high education in maths: perhaps a number representing an integer but expressed with the scientific notation must not be considered as an integer.
Otherwise, step 5.3 of consume a number could be replaced after step 6 by evaluating if
repr
is an integer. I do not know how this evaluation can be translated into spec/WebIDL terms.Perhaps it can not be fixed because it would break parsing eg.
<signless-integer>
and<signed-integer>
.Or it may simply be decided that it is not worth to be fixed.
The text was updated successfully, but these errors were encountered: