Kenny Graham wrote:
> just curious... I know served as XML, the comments should be
> completely ignored, but if it's served as text and parsed all
> SGML-ish, are comments supposed to count as nodes?  I'm one of the
> lucky young ones who never dealt with the fun old ways of spacer gifs
> and table layouts, so I haven't a clue.  And if they do count as
> "comment nodes" or whatever, would IE's behavior there be correct?

No it's not correct, according to CSS 2.1:

"Adjacent sibling selectors have the following syntax: E1 + E2, where E2 
is the subject of the selector. The selector matches if E1 and E2 share 
the same parent in the document tree and E1 immediately precedes E2, 
ignoring non-element nodes (such as text nodes and comments)."

<http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors>

At a guess, their code for implementing adjacent selectors (which is 
part of the new IE 7 code and thus not yet thoroughly testes) is looking 
through the DOM tree for the next element node, but is somehow getting 
the impression that the comment node _is_ an element node. Quite how one 
would manage to write code that does this is hard to see, but then again 
it's the kind of idiotic mistake I and every other programmer in the 
world make all the time :-)

You might want to add the above CSS 2.1 reference to your bug report at 
the IE feedback site, just so they know.

Cheers,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to