[csswg-drafts] [css-forms-1] What does control-value() return for `<progress>` and `<meter>`? (#12367)

lukewarlow has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-forms-1] What does control-value() return for `<progress>` and `<meter>`? ==
Currently, [`control-value()`](http://localhost:8000/Overview.html#control-value) is defined to only return a value for a "form control" (which isn't defined). I'm assuming this should be more generic and work for at least the  `<progress>` and presumably `<meter>` elements too?

If we assume that it does work, what does it return?

`<progress value="25" max="50">` - given this element the value property in fact returns 25, but the position property returns 50 (which is the rendered progress of the control), Should `control-value()` match value proper, or position?

For `<progress>` doing that maths yourself is on the surface quite easy but there's various edge cases that the browsers IDL properties handle for you which it would be good to avoid needing to write JS or the logic in CSS.

For `<meter>` it's even more complicated by the addition of the min attribute into the mix (progress always has a minimum of 0).

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12367 using your GitHub account


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

Received on Wednesday, 18 June 2025 20:14:27 UTC