Re: The canvas

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 UTC