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

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

From: Simon Sapin <simon.sapin@exyr.org>
Date: Wed, 09 Jul 2014 15:39:42 +0100
Message-ID: <53BD542E.5010809@exyr.org>
To: www-style@w3.org
3.11. "Backgrounds of Special Elements" explains how the background of 
:root or <body> extends to cover the entire canvas, but does not specify 
what happens when the corresponding element has `visibility: hidden` or 
`display: none`.

Firefox 30, Chromium 35, IE 11, and Opera 12 all agree to paint the 
background with `visibility: hidden`, but not with `display: none`. I 
suggest specifying both cases explicitly.

Test cases:

data:text/html,<style>html{background:green}</style>
data:text/html,<style>body{background:green}</style>

data:text/html,<style>html{background:green;visibility:hidden}</style>
data:text/html,<style>body{background:green;visibility:hidden}</style>

data:text/html,<style>html{background:red;display:none}</style>
data:text/html,<style>body{background:red;display:none}</style>

-- 
Simon Sapin
Received on Wednesday, 9 July 2014 14:40:08 UTC

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