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 Not Parsed Correctly #11

Open
RoBorg opened this issue Jan 25, 2020 · 0 comments · May be fixed by #12
Open

CSS Not Parsed Correctly #11

RoBorg opened this issue Jan 25, 2020 · 0 comments · May be fixed by #12

Comments

@RoBorg
Copy link

RoBorg commented Jan 25, 2020

The library does not parse CSS numbers correctly:

  • Doesn't allow numbers without a leading 0
  • Doesn't allow scientific notation
  • Doesn't allow % for alpha
  • Doesn't allow units for hue in hsl (the hue is an angle
  • Hue is clamped instead of wrapping around (e.g. 540deg should be the same as 180, not 360)
  • Floating percentages are not allowed for RGB (e.g. 10.5%)

rgba(0, 0, 0, 0.5) - Parsed correctly: [0, 0, 0, 0.5]
rgba(0, 0, 0, .5) - Parsed incorrectly: [0, 0, 0, 1]
rgba(0, 0, 0, 50%) - Parsed incorrectly: [0, 0, 0, 1]
rgba(0, 0, 0, 50%) - Parsed incorrectly: [0, 0, 0, 1]
rgba(0, 0, 0, +00.5e2%) - Parsed incorrectly: [0, 0, 0]

@RoBorg RoBorg linked a pull request Jan 25, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant