CSS3 the pseudo-class :root

Some Examples

div id="normal"

This block should render as gray text on a light gray background on most CSS-aware browsers. No hacks are employed in the CSS rule for this block.

div id="onlyGeckoForNow"

This block on the other hand should display white italicized text against a green background for browsers that recognize the :root pseudo-class. As of May 2005 it seems that only Gecko-based browsers such as Mozilla, Firebird, and Netscape 7 do.

The CSS rules for the above are as follows:

div#normal, div#onlyGeckoForNow
  margin: 1em;
  padding: 1em;
  background: #eee;

:root div#onlyGeckoForNow
  background: #090;
  color: white;
  font-style: italic;