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

Re: Properties applicable to root?

From: Tantek Celik <tantek@cs.stanford.edu>
Date: Wed, 30 Sep 1998 14:30:33 -0700
To: Todd Fahrner <todd@verso.com>, www-style@w3.org
Message-ID: <1304957150-1093643@psdbay.com>
> From: Todd Fahrner <todd@verso.com> 
> <Todd points out inconsistencies in box model implementation on the root
element>
>
>This must stop. I propose the following clarifications for visual media
types:
>
>1. The root of an HTML document is the HTML element. The root element of an
>XML document can be anything, but it's always present and unique by
>definition.
Seems reasonable to me.  Perhaps we need a new pseudo-class, :root, so that
a style sheet does not have to depend on a particularly named tag being the
"root" element.

>2. The root element cannot accept most box properties. Its width is defined
>as that of the rendering area (e.g. the window or page width).
Why not have the width of the root element determine the width of the
viewport?  I think that ability would be useful to authors attempting to
fine tune the experience of their pages.  (Imagine enabling a 'kiosk' sort
of thing with width:100% and height:100% on the root element)
You could also use the 'overflow' property on the root element to determine
whether or not scrollbars show up on the viewport.

> It cannot
>take either margin

You just said that TOPMARGIN etc. were implemented due to author demand. 
And now you're saying that it should be de-implemented?

> or border properties
Perhaps the border properties could apply to the border drawn on the
viewport itself, for UAs and platforms that would support that.  Again, more
author control over the presentation.

> (as outside the width), but it can
>take padding. It can take only either the "none" or "block" display types.
I would loosen that to say it could take "none" or one of the "block-level"
display types.

>It can also take color and font properties. It cannot float.
You could interpret float within the context of the screen/viewing area.
For example:
HTML { float:left }
could float the window to the left edge of the screen, similarly with
float:right.  See below for why this would be useful.

>3. For HTML explicitly, the BODY (and HEAD) elements should accept all
>normal box properties, just like any other blocks. The HTML element itself
>should take most CSS properties excepting those outlined in (2).
>
>Thoughts?
You could also allow positioning of the viewport within the screen:
HTML { position: absolute; top: 20px; left: 20px;}

Another example: say you have two documents you want to present to the user
side-by-side on their screen, each taking 50% of the width of the screen. 
You could use the following two stylesheets:

// stylesheet 1
HTML { float: left; width: 50%; overflow:scroll }

// stylesheet 2
HTML { float: right; width: 50%; overflow:scroll }

Thoughts?

Tantek Celik
Internet Explorer for Macintosh
tantekc@microsoft.com
Received on Wednesday, 30 September 1998 17:22:57 GMT

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