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

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 UTC