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

Only deg is supported as an angular unit for hues #180

Closed
Crissov opened this issue Jun 30, 2022 · 0 comments · Fixed by #324
Closed

Only deg is supported as an angular unit for hues #180

Crissov opened this issue Jun 30, 2022 · 0 comments · Fixed by #324

Comments

@Crissov
Copy link

Crissov commented Jun 30, 2022

Currently, src/util.js has a TODO note to handle more (angular) units. These are rad, gradandturn` in CSS.

I believe it would also be useful to accept the degree sign ° U+00B0 (i.e. outside US-ASCII) as a synonym for deg, which is currently possible due to lax parsing that ignores punctuation characters after the number.

I've also argued before that pi or pirad should be a valid angular unit in CSS. This would be trivial to add. However, since hues are almost always provided in degrees, this is probably not the best place to make that case.

By the way, the regular expressions used in parseFunction() do also not accept all numbers allowed by CSS Values and Units or CSS Syntax, e.g. scientific notation, and they are not case-insensitive.

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