W3C home > Mailing lists > Public > www-style@w3.org > October 2009

Styling HTML5 elements

From: Steve Workman <steve.workman@gmail.com>
Date: Thu, 15 Oct 2009 14:02:52 +0100
Message-ID: <60742dff0910150602w57ab3386o75122c2dc27f4b82@mail.gmail.com>
To: www-style@w3.org
Hi all,

I've been looking at styling HTML 5 elements using CSS3 and have come across
some examples where it doesn't suffice.

A recent html5doctor.com post on the meter tag (
http://html5doctor.com/measure-up-with-the-meter-tag/) brought up some
issues with styling of such an element. I wrote a blog post about it here:
there's a brief summary below:

This code:
<dd><meter min=”245″ value=”245″ title=”pounds”>245</meter></dd>
<dt>Amount raised so far</dt>
<dd><meter min=”0″ max=”250″ value=”185″ title=”pounds”>185</meter></dd>

should be able to produce this image:

I could only get this far: http://download.steveworkman.com/meter.html and
that's only when using javascript.

The fundamental issue is that using CSS and HTML5 alone, you do not have
access to values of attributes that you can use again to set CSS properties..
My main issue is that this is trivial in javascript, as demonstrated on the
demo page.

There are some potential CSS modules that can help in this respect, namely
CSS Variables and CSS Math. I am also oblivious to the power of canvas and
SVG, so if anyone can give me an answer using those I’d be very pleased.

Does anyone in the group have an idea as to how you would produce this

Many thanks,
Steve Workman

Received on Thursday, 15 October 2009 13:40:05 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:40 UTC