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

Support for plus sign for numeric values #26

Closed
kizu opened this issue Sep 26, 2016 · 2 comments
Closed

Support for plus sign for numeric values #26

kizu opened this issue Sep 26, 2016 · 2 comments

Comments

@kizu
Copy link

kizu commented Sep 26, 2016

CSS Values and Units Module 3 spec descibes <integer> and <number> in a way that allows plus sign at the start:

The first digit of an integer may be immediately preceded by - or + to indicate the integer’s sign.

And it actually works: http://dabblet.com/gist/360b21da0e0175a36698aa0d79396411

So, almost anywhere the + is allowed, however CSStree gives a Mismatch validation error.

@lahmatiy
Copy link
Member

You're right, numbers parses is incorrect in some cases:

  • preceding + is not including to number node (so it's 2 nodes + and number now)
  • following exponent is not attaching to number node (e.g. 1e2 or 1e-10 are processing as number with something strange after and it cause to parse error)

I'm working on it right now. But I was faced with the problems, so it takes more time than I expected.

@kizu
Copy link
Author

kizu commented Sep 28, 2016

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants