Skip to content

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

Open
@lukewarlow

Description

@lukewarlow

Currently, 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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions