Re: [csswg-drafts] [css-values-4] Should progress() functions clamp to 0-100%? (#11825)

This is something I thought about, and in the use cases where I tried `progress()`, I always wanted it to be clamped. And wrapping something with `clamp(0, progress(), 1)` was a bit cumbersome.

I wonder if we can make this to be controlled by an optional keyword inside `progress()`?

Like `progress(clamped, 200px, 0px, 100px)` if it is not clamped by default, or something like `progress(full, 200px, 0px, 100px)` if we decide to clamp by default.

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.


-- 
GitHub Notification of comment by kizu
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11825#issuecomment-2705918302 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 7 March 2025 09:10:59 UTC