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

Re: Comments on WD-css3-background-20010924

From: Bert Bos <bert@w3.org>
Date: Fri, 28 Sep 2001 21:28:08 +0200
Message-ID: <15284.53064.230942.540671@lanalana.inria.fr>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: www-style@w3.org, frederick.boland@nist.gov
Bjoern Hoehrmann writes:
> Hi,
>    Some comments on
> http://www.w3.org/TR/2001/WD-css3-background-20010924

I made the suggested changes in our internal draft. They should show
up the next time the draft is published.

> 3. Background:
> [...]
>   The background of the box generated by the root element covers the
>   entire canvas.
> [...]
> Thus margin properties don't apply to the root element or aren't margins
> of the root element not part of the "canvas"?

Margins do apply, it is just that the root element has some special
features and restrictions.

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. 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

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 special.

> [...]
>   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.

Good question. Since XHTML (at least from 2.0 onwards) is supposed to
be an examplary XML-based format, with as little semantics as possible
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.

  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Friday, 28 September 2001 15:28:13 UTC

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