[whatwg] Request: Canvas Tag CSS

Greg Houston wrote:
> I didn't know SVG had CSS support. That's great, but I fail to see your point.
> 
> A table serves a different purpose than a div, yet both are styled in the CSS.
> 
> A paragraph serves a different purpose than an image, yet both are
> styled in the CSS.
> 
> A blockquote serves a different purpose than a submit button, yet both
> are styled in the CSS.
> 
> SVG and Canvas serve different purposes, yet the both have style, and
> both should be supported by CSS.

Except that there is a slight difference between a declarative element 
and a programmatic one.

SVG being declarative, it has an actual DOM tree with elements and 
attributes that can be affected using CSS.

The Canvas element itself can be styled with CSS ( borders, size, 
outlines, background, ... ) but what is done in the CanvasContext does 
not end up in the DOM tree and therefore their styling can not be 
affected using CSS.


-- 
Mathieu 'p01' HENRI
JavaScript developer, Opera Software ASA

Received on Tuesday, 8 April 2008 01:49:43 UTC