W3C home > Mailing lists > Public > www-style@w3.org > March 2004

Re: CSS3 Tests site

From: Claus Wahlers <claus@ego7.com>
Date: Tue, 23 Mar 2004 12:00:36 +0100
Message-ID: <406018D4.8030103@ego7.com>
To: www-style@w3.org

sean,
even if mozilla supported "~", your prevsib.html test would fail.

#nosup ~ h3 {
display: none;
}
#sup ~ span {
display: block;
}

<h3>Example</h3>
<span id="nosup">Your browser does not support ~ selector.</span>
<span id="sup">Your browser supports the ~ selector.</span>

the first rule always fails as there is no element with ID nosup above
h3. the second rule fails as there is no element with ID sup above the
span elements. combinated selectors are evaluated right to left, not
left to right.

this is how it should be right:

h3 ~ #nosup {
display: none;
}
span ~ #sup {
display: block;
}

also, "No browser supports ~ yet" is not really correct:
http://tinyurl.com/3c7jl
(see http://claus.packts.net/deng for more info)
cheers,
claus.
codeazur.com


Sean M. Hall wrote:

 >
 > I have just launched a CSS3 tests site at
 > http://geocities.com/seanmhall2003/css3
 > <http://geocities.com/seanmhall2003/css3>
 > It only contains two tests so far but I plan on adding many many more in
 > the very near future.
 >
 > If anyone is interested please email me at pianoman@reno.com
 > <mailto:pianoman@reno.com>
 >
 > Thank you
 > *Dante Evans (AKA Sean M. Hall) *
 > *Freelance musician, historian, writer, web developer *
 > * www.sfhe.cjb.net <http://www.sfhe.cjb.net> *
 > *CEO of DCScript *
 > * www.dcscript.vze.com <http://www.dcscript.vze.com> *
 > *'Evans, Dante Evans' *
Received on Tuesday, 23 March 2004 06:00:48 GMT

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