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

[whatwg] Request: Canvas Tag CSS

From: Anne van Kesteren <annevk@opera.com>
Date: Sun, 06 Apr 2008 17:10:12 +0200
Message-ID: <op.t8623alb64w2qv@annevk-t60.oslo.opera.com>
On Sun, 06 Apr 2008 10:49:01 +0200, Greg Houston  
<gregory.houston at gmail.com> wrote:
> 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.

Since <canvas> uses the <color> production from CSS why does a global  
search and replace through JavaScript files and CSS files not suffice?

Alternatively, you could use getComputedStyle() to get the color values  
 from your CSS file.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Sunday, 6 April 2008 08:10:12 UTC

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