Minor error in CSS2, section 14.2; 'background'

The CSS2 spec says, in section 14.2:
# 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.

I believe there is a slight error in this paragraph, in that every
occurance of 'background' should actually read 'background-color'. 

The 'background' property cannot have the value 'transparent', since
it is a shorthand property.

Furthermore, if the BODY background value is used when the HTML
element's 'background[-color]' value is transparent, then you get the
peculiar result that the following:

   HTML { background: url(logo.png) no-repeat top right; }
   BODY { background: white url(paper.png) repeat; }

...would result in no logo.

I suggest that the errata include an item saying that fourth paragraph
should be changed to read:
# 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-color' property for the
# HTML element is different from 'transparent' then use it, else use
# the value of the 'background-color' property for the BODY element.
# If the resulting value is 'transparent', the rendering is undefined.

-- 
Ian Hickson
: Is your JavaScript ready for Nav5 and IE5?
: Get the latest JavaScript client sniffer at 
: http://developer.netscape.com/docs/examples/javascript/browser_type.html

Received on Sunday, 5 September 1999 08:30:10 UTC