Mikko Rantalainen
2018-03-19 11:13:07 UTC
According to
https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element
following inequalities must hold for <meter>:
minimum ≤ value ≤ maximum
minimum ≤ low ≤ maximum (if low is specified)
minimum ≤ high ≤ maximum (if high is specified)
minimum ≤ optimum ≤ maximum (if optimum is specified)
This (and other prose) allows for following element
<meter min=0 value=0 max=0>Nothing to be done</meter>
https://jsfiddle.net/zx5xesg6/
However, rendering engines (at least Blink and Gecko) disagree on
rendering of such an element. Blink renders this as an empty meter and
Gecko renders this as an full meter.
I'm slightly balanced for rendering this as full meter (Gecko style)
because I would guess such meter is usually displaying some kind of
progress ("total number of items completed for this exam") and if
nothing is to be done, the meter should be full. Another choice would be
to make this even more similar to <progress> which already handles
similar situation similarly between different user agents.
The spec should specify one way or the other for this corner case.
https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element
following inequalities must hold for <meter>:
minimum ≤ value ≤ maximum
minimum ≤ low ≤ maximum (if low is specified)
minimum ≤ high ≤ maximum (if high is specified)
minimum ≤ optimum ≤ maximum (if optimum is specified)
This (and other prose) allows for following element
<meter min=0 value=0 max=0>Nothing to be done</meter>
https://jsfiddle.net/zx5xesg6/
However, rendering engines (at least Blink and Gecko) disagree on
rendering of such an element. Blink renders this as an empty meter and
Gecko renders this as an full meter.
I'm slightly balanced for rendering this as full meter (Gecko style)
because I would guess such meter is usually displaying some kind of
progress ("total number of items completed for this exam") and if
nothing is to be done, the meter should be full. Another choice would be
to make this even more similar to <progress> which already handles
similar situation similarly between different user agents.
The spec should specify one way or the other for this corner case.
--
Mikko
Mikko