-
Notifications
You must be signed in to change notification settings - Fork 717
[css-values-4] Should progress() functions clamp to 0-100%? #11825
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
I wouldn't clamp, just like for #6701 It would seem very weird to me if |
This is something I thought about, and in the use cases where I tried I wonder if we can make this to be controlled by an optional keyword inside Like Even without default clamping, having a keyword for this common case will be better than manually clamping. Personally, I would prefer to optimize for the more common use cases. But that's not a strong preference. |
Maybe |
It feels like there was a single word for unlimited progress, |
As I started to use |
What do you mean? Let's say I want to know how far It seems to me that the opposite is true: if the result is not clamped and you want it clamped, you can trivially clamp it with |
Uh oh!
There was an error while loading. Please reload this page.
A lot of use cases for the progress functions require clamping the value to 0-100%. Some use cases don't... but the driving use cases generally do.
Should
progress()
clamp to 0-100% by default? It's always possible to get the unclamped result by usingcalc()
.If it doesn't, then authors will need to manually clamp it all the time, which probably gets annoying, especially since you need to repeat the start/end values.
clamp(0%, progress(_value_, 0%, 100%), 100%)
...The text was updated successfully, but these errors were encountered: