[whatwg] Status bars and progress indicators
Afternoon
afternoon at uk2.net
Thu Sep 23 04:19:40 PDT 2004
<status> is good, <progress> another possibility?
On 23 Sep 2004, at 10:53, Mikko Rantalainen wrote:
> Regardless of the word that ends up being used I think the element
> should also have property to tell which value is "GOOD" and which is
> "BAD". For example, for search results having 95% to render as green
> bar is okay whereas 95% for CPU temperature is bad and it should be
> rendered as red. Obviously the indicator for good/bad could be
> something else but color but you get the idea.
>
> Make sure to support status/gauge where good value is something in
> between. For example, think motor temperature of an automobile; it's
> bad if it's too low and it's bad if it's too high.
This sounds like a really nice idea, but one that is tricky to define
markup for.
A simple example might be:
<status min="0" max="100" value="94" optimal="100"/>
With a bar this could be graded from red at 0, to green at 100. This
could be the display method for the relevance of a search result for
example. The status tag could have pseudo-classes for this:
status:optimal { color:green; }
status:nonoptimal { color:red; }
Other examples may be far more complicated however, involving multiple
banding and differing colour change rates for different sections of the
process. For example, motor temperature, when the value is too low you
might only want orange, tending to green at the optimal temperature,
and then onwards in increasingly alarmingly shades of red until the
point where the engine blows up. However the distribution might not be
even, with orange being at 0, green at 60 and red at 300, for example
(apologies for inaccuracies, I know little about cars).
In this situation, would it not just be easier to use javascript to
implement your own rules?
Ben
((Ben Godfrey) (Software) (see "http://www.cohack.com/"))
More information about the whatwg
mailing list