[whatwg] Request: Canvas Tag CSS

Anne van Kesteren annevk at opera.com
Sun Apr 6 08:10:12 PDT 2008


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/>



More information about the whatwg mailing list