RE: [CSS21] Make XHTML <body> magic just like HTML <body>

Section 14.2 states:

For HTML documents, however, we recommend that authors specify the background for the BODY element rather than the HTML element. For HTML documents whose root HTML element has computed values of 'transparent' for 'background-color' and 'none' for 'background-image', user agents must instead use the computed value of those properties from that HTML element's first BODY element child when painting backgrounds for the canvas, and must not paint a background for that BODY element. Such backgrounds must also be anchored at the same point as they would be if they were painted only for the root element. This does not apply to XHTML documents. 

I guess the proposal would be no remove the last sentence, replace "HTML" with "HTML and XHTML" and replace "BODY" with "body".

Peter

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Rainer Åhlfors
Sent: Wednesday, March 07, 2007 11:11 AM
To: 'Simon Pieters'; www-style@w3.org
Subject: RE: [CSS21] Make XHTML <body> magic just like HTML <body>


First of all -- shouldn't this go in an XHTML related thread?

And, can you expand more on what you mean by "magic"? I know what I
understand it as, but I am not entirely sure that covers exactly what you
mean. So, can you expand on the differences and proposed changes in detail?

 
Rainer

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
Of Simon Pieters
Sent: Wednesday, March 07, 2007 11:58 AM
To: www-style@w3.org
Subject: [CSS21] Make XHTML <body> magic just like HTML <body>


Having special rules for <body> in HTML but not in XHTML makes it harder  
for authors to switch to and from XHTML.

There are lots and lots of pages that rely on the magicness in HTML. So it  
can't be removed from HTML.

There are very few XHTML pages on the Web. Some of them might look  
incorrect because the author thought the <body> was magic, but it wasn't  
(resulting in e.g. the <body>'s background not covering the canvas). (I've  
seen such documents, told the author about this incompatibility, and then  
got it "fixed".) I think literally not a single document relies on it  
*not* being magic. Making it magic for XHTML would thus not break any  
documents.

I don't think it's too late to make the special rules that apply to HTML  
<body> apply to XHTML as well for CSS2.1.

I think these are the special properties:

  * 'background-color'
  * 'background-image'
  * 'overflow'


I know this has been proposed before. I still think it should be  
considered again.

Regards,
-- 
Simon Pieters

Received on Wednesday, 7 March 2007 19:46:37 UTC