W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-backgrounds] Canvas background with display:none or visibility:hidden

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 09 Jul 2014 22:19:46 -0400
Message-ID: <53BDF842.3000204@mit.edu>
To: www-style@w3.org
On 7/9/14, 5:26 PM, Matt Rakow wrote:
> I'm not necessarily opposed to a change here, but I don't really think the spec seems ambiguous at present.  I also think that special-casing display:none adds complexity that isn't really necessary.

There's an issue here: the painting of the canvas background depends on 
the sizing (and positioning within the viewport) of the root element's 
box.  That's not obvious with a solid color background, but becomes very 
clear with a background image.

So you need some sort of special casing no matter what.  I just tested 
what IE11 does here; compare 
<http://web.mit.edu/bzbarsky/www/testcases/css-backgrounds/root-background-image-display-block.html> 
and 
<http://web.mit.edu/bzbarsky/www/testcases/css-backgrounds/root-background-image-display-none.html>. 
  It looks like in the latter case IE11 uses the viewport instead of the 
(nonexistent) root element's box for the background positioning area. 
This is clearly special-casing the display:none case, no?

-Boris
Received on Thursday, 10 July 2014 02:20:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC