-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Let color functions accept Anonymous and Quoted types #1215
Labels
Comments
related to #387 |
There is a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am working an a medium scale web app that will allow the admin to customize the interface colors by setting 4 core theme colors. Those 4 colors map to variables which in turn control every color on the site. I ran into a very large issue where hsla() did not clamp "out of range" values and eventually I said something about it over here: #821 (comment)
However, while trying to figure it out on my own for quite a while I tried so many things. The one idea I had was to clamp the values myself via javascript like this:
But I found that when I passed my 'x' variables to hsla() it told me that it only accepted numbers! Bummer. Well I spent the next 4-8 hours trying to figure out how to convert a damn string to a number. There is no way to do it!!! That's another issue entirely which I'll write up.
So I propose that the number function should be modified to something like this:
This only makes sense too, because the more developers use javascript within less the more likely they will have to pass the result of the javascript through another function which doesn't accept strings or anonymous.
The text was updated successfully, but these errors were encountered: