[whatwg] CSS canvas() function

Boris Zbarsky bzbarsky at MIT.EDU
Wed Dec 1 21:43:08 PST 2010


On 12/2/10 12:34 AM, Simon Fraser wrote:
> It's a shame to disallow HTML elements with known width and height, e.g.
> if you want to render a small disconnected <div> subtree into a <canvas>
> or map it onto a WebGL texture. You'd have to decide how to resolve
> style (maybe assume it's a child of the body?).

It's not that simple, actually.  You'd also have to create special CSS 
boxes for the root of the subtree (e.g. it would need to be at least a 
float, absolute, and fixed containing block), no?  And if it happens to 
be display:inline that can get a little complicated, esp. for floats, 
since normally that situation doesn't arise in CSS.

I suspect that actually fully specifying this sort of thing would be 
pretty difficult.

-Boris



More information about the whatwg mailing list