W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2010

[whatwg] CSS canvas() function

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 02 Dec 2010 00:43:08 -0500
Message-ID: <4CF731EC.3090501@mit.edu>
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
Received on Wednesday, 1 December 2010 21:43:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:02 UTC