W3C home > Mailing lists > Public > www-style@w3.org > November 1999

Re: The canvas

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Thu, 11 Nov 1999 20:07:33 -0500 (EST)
Message-Id: <199911120107.UAA30855@is03.fas.harvard.edu>
To: fahrner@pobox.com, www-style@w3.org
On Thu, 11 Nov 1999 10:53:30 -0800, Todd Fahrner (fahrner@pobox.com)
wrote:
> It's been a while since I thought hard about this, but I remember my 
> conclusion: the root element can have neither margins nor border, 
> only padding. The "box acid test" 
> (http://style.metrius.com/boxacidtest/) was coded in accord with this 
> belief.

I can understand why you would say it can't have margin.  However, why
no border?  According to CSS2 8.5.3 [1], the background covers to the
border edge (not the padding edge), so there's no problem with dashed
or dotted or transparent borders.  (Section 14.2 [2] seems to disagree
with this, though, but 8.5.3 makes more sense.)

I don't think your conclusion *must* follow from the spec.  It's one of
the options (maybe - see below), but since the root element's
background covers the entire canvas, it could just cover the root
element's margin (and all the area outside the root element's margin
caused by horizontal scrollbars).

For that matter, how does your view explain that the background extends
to the right when there's a horizontal scrollbar (since the fourth
paragraph of CSS2 section 9.1.2 [3] says that the width of the root
element is the width of the viewport)?

David

[1] http://www.w3.org/TR/REC-CSS2/box.html#border-style-properties
     (thanks to Ian Hickson for finding this reference which I knew
	 existed somewhere)
[2] http://www.w3.org/TR/REC-CSS2/colors.html#q2
[3] http://www.w3.org/TR/REC-CSS2/visuren.html#containing-block

L. David Baron    Sophomore, Harvard (Physics)    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.     <URL: http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                      <URL: http://www.webstandards.org/css/ >
Received on Thursday, 11 November 1999 20:07:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:01 GMT