W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2008

[whatwg] Request: Canvas Tag CSS

From: Krzysztof Żelechowski <giecrilj@stegny.2a.pl>
Date: Mon, 07 Apr 2008 17:31:49 +0200
Message-ID: <1207582309.6686.72.camel@a1dmin.vola.spe.com.pl>

Dnia 06-04-2008, N o godzinie 03:49 -0500, Greg Houston pisze:
> Having worked with the canvas tag quite a bit now, I've found that it
> is a bit awkward that the canvas tag is not taking advantage of CSS.
> If you are changing your site design, perhaps you want to change the
> colors used in your line graphs as well. So you make the changes in
> your CSS for the majority of your elements, which is rather painless,
> and then for the canvas tag you then have to start digging through the
> JavaScript to make your changes.
> Say you are using the canvas tag to create buttons with a border and a
> gradient. It would be nice to be able to change that gradient, and the
> border size and color in the CSS. Maybe you are theming a site that is
> using canvas elements. You are not comfortable with fooling with the
> javascript, but if the basic shapes had CSS rules you might be a bit
> more confident in making style changes.

What if some script changes the rules?  
Do you want the UA to infer the dependencies 
and redraw the whole picture?
Canvas is an imperative element, and that is on purpose.  
You want to mix a declarative mechanism in.  That is bad style.

Received on Monday, 7 April 2008 08:31:49 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:01 UTC