W3C home > Mailing lists > Public > www-style@w3.org > October 2001

Re: Comments on WD-css3-background-20010924

From: Etan Wexler <ewexler@stickdog.com>
Date: Mon, 1 Oct 2001 23:33:00 -0500
To: Web style list <www-style@w3.org>
Message-Id: <20011002032600.4B32C15089C@server11.safepages.com>
Bert Bos wrote:

> Since there is no element in the document that corresponds to the
> canvas (obviously), there is no selector for it, and thus no way to
> set the background of the canvas.

Are we talking about the CSS1 canvas or about the CSS2 canvas?

You see, in CSS2 the canvas is the infinite plane on which the 
rendition happens.  The CSS2 canvas extends, for example, off a 
computer screen.  A particular rectangular region of the canvas, the 
initial containing block, is where the rendition actually appears.  
The CSS1 canvas is the same as the CSS2 initial containing block.

> We could have invented '@canvas' or
> some such, but then people wouldn't have been able to set the
> background in the document itself (with <BODY BGCOLOR> or with <BODY
> STYLE="...">).

That's no big loss.  It is counter-productive to craft CSS around poor 

> Therefore any background set on the root element also applies to the
> canvas (and thus also to the element's margins, since they are
> transparent). And in HTML, for tradition's sake, BODY is also 

Regardless of the semantics of the word "canvas", the intent is bad.  
Let the margins show the window color or page color.  If authors want 
a background extending to the edges of the viewport, they should zero 
the margins of the root element.

To throw a wrench in the spokes, consider a document embedded in 
another document (as by the 'OBJECT' element type).  We now have two 
root elements, one from each document.  Certainly we don't want the 
embedded document to obscure the embedding document via a 
canvas-wide background.  This case is not even mentioned by the 
passages on root background.

>>   For HTML documents, however, we recommend that authors specify the
>>   background for the BODY element rather than the HTML element.
>> Why? Does this also apply to XHTML documents?
> Tradition of the BODY BGCOLOR attribute.

This is quite a poor reason for perpetuating exceptional and bad 

> Good question. Since XHTML (at least from 2.0 onwards) is supposed to
> be an examplary XML-based format, with as little semantics as 
> that is not derived from other specifications (CSS, XLink, etc.), and
> since XHTML doesn't have a BGCOLOR attribute anyway, I guess we can
> remove the special treatment of BODY in the case of XHTML.

HTML4 and XHTML1 are semantically identical, differing only in 
low-level syntax.  If it is feasible to refuse special treatment for 
the 'body' element type in XHTML, it is feasible to refuse special 
treatment for the 'BODY' element type in older HTML.  Indeed, the 
special treatment was unnecessary and queer from the start.

Etan Wexler
Received on Monday, 1 October 2001 23:26:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:59 UTC