W3C home > Mailing lists > Public > www-style@w3.org > May 2002

Re: canvas <html> <body>

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 01 May 2002 12:09:33 +0100
Message-ID: <3CCFCCED.5080408@hixie.ch>
To: Sigurd Lerstad <sigler@bredband.no>
CC: www-style@w3.org
Sigurd Lerstad wrote:
> I'm confused,
> How can a stylesheet determine which is the root, html or body ?

By uisng the :root pseudo-class.

    html:root { }

...will only match <html> elements that are the root element, and

    body:root { }

...will only match <body> elements that are the root element.

(This uses CSS3's new selectors.)

Ian Hickson
``The inability of a user agent to implement part of this specification due to
the limitations of a particular device (e.g., non interactive user agents will
probably not implement dynamic pseudo-classes because they make no sense
without interactivity) does not imply non-conformance.'' -- Selectors, Sec13
Received on Wednesday, 1 May 2002 07:09:46 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:01 UTC