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

On Wed, 8 Sep 1999 18:37:51 -0700 , Chris Wilson (cwilso@MICROSOFT.com)
wrote:
> 
> I see.  Changes introduced in CSS2 win again.
> 
> I'd like to see this reconciled with the background attributes on body - If
> HTML is the root display node, then according to CSS the BODY must only be
> as large as its content (unless width/height are explicitly given), and the
> BACKGROUND/BGCOLOR would only be shown under the actual content.
> 
> Not to mention, of course, the other proprietary mechanisms introduced on
> BODY long before CSS2.

This was already reconciled by statements in both CSS1 and CSS2.  CSS1,
section 4.5, says:

# HTML extensions have set a precedent for the second question:
# attributes on the 'BODY' element set the background of the whole
# canvas. To support designers' expectations, CSS1 introduces a special
# rule to find the canvas background:
# 
#   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.

This is repeated in CSS2, section 14.2:

# The background of the box generated by the root element covers the
# entire canvas.
# 
# For HTML documents, however, we recommend that authors specify the
# background for the BODY element rather than the HTML element.  User
# agents should observe the following precedence rules to fill in the
# background: if the value of the 'background' property for the HTML
# element is different from 'transparent' then use it, else use the
# value of the 'background' property for 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.

David

[1] http://www.w3.org/TR/REC-CSS1#the-canvas
[2] http://www.w3.org/TR/REC-CSS2/colors.html#q2
[3] http://lists.w3.org/Archives/Public/www-style/1999Sep/0026.html

Received on Wednesday, 8 September 1999 22:24:12 UTC