Futomi Hatano wrote:
Hi, all
I found an odd example in the meter element section of the spec.
http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-meter-element
<meter>max: 100; current: 75</meter>
According to "steps for finding one or two numbers of a ratio in a string",
does it means that the actual value is 100 and the max value is 75?
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#steps-for-finding-one-or-two-numbers-of-a-ratio-in-a-string
If so, the gauges would end up looking maxed out.
Should it be as below?
<meter>current: 75; max: 100;</meter>
Thank you.
No, the larger number is always used as the max, and the smaller as
current. In the meter section: "(...) if there were two numbers parsed
out of the textContent, then the maximum is the higher of those two
numbers." and "(...) if the result of processing the textContent of the
element was two numbers, then the actual value is the lower of the two
numbers found."
--
Magnus Kristiansen
"Don't worry; the Universe IS out to get you."