W3C home > Mailing lists > Public > www-style@w3.org > September 1999

Re: Minor error in CSS2, section 14.2; 'background'

From: David Perrell <davidp@earthlink.net>
Date: Fri, 10 Sep 1999 09:59:44 -0700
Message-ID: <006501befbad$e1c969e0$14ea2bd1@etelos.com>
To: "'www-style'" <www-style@w3.org>
L. David Baron wrote:

> This was already reconciled by statements in both CSS1 and CSS2.  CSS1,
> section 4.5, says:
> ...
> #   If the 'background' value of the 'HTML' element is different from
> #   'transparent' then use it, else use the 'background' value of the
> #   'BODY' element. If the resulting value is 'transparent', the
> #   rendering is undefined.
> ...
> The earlier discussion in this thread was that these statements are not
> quite adequate.  I proposed in [3] what I think is the correct
> solution

Your solution is admirable but not a contribution to reconcilation. Complicated caveats make a specification hard to understand at best.

The section in question would certainly be simpler if the HTML element and all its children except BODY were considered to be outside the rendering tree, and BODY to be the effective root element for extending backgrounds onto the canvas, period. Every attempt to reconcile the HTML document tree and rendering tree seems to further obfuscate the spec for CSS neophytes.

If the current 'reconciliation' is fait accompli, then consider that even if the value of background-color is 'transparent', the background is _not_ transparent if background-image has been specified. So these rules:

   html { background-image: url(logo.png); }
   body { margin: 20px; background-color: white; }

display a 20-pixel-wide area around the body element through which logo.png is visible. The background-color behind logo.png is transparent and therefore undefined.

David Perrell


> [3] http://lists.w3.org/Archives/Public/www-style/1999Sep/0026.html
> 
> 
Received on Friday, 10 September 1999 12:59:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:00 GMT