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

IE8 using conditional comment violates the support of sibling selectors

From: Alan Gresley <alan1@azzurum.com>
Date: Thu, 06 Mar 2008 08:20:04 -0700
To: www-style@w3.org
cc: Chris Wilson <Chris.Wilson@microsoft.com>, Eric Lawrence <e_lawrence@hotmail.com>, Alex Mogilevsky <alexmog@exchange.microsoft.com>
Message-ID: <20080306082003.34b83c2f3c9bef00757a2c62c0fb7450.71d248c98e.wbe@email.secureserver.net>

Hi everyone


Please see this test case.

http://css-class.com/test/css/selectors/ie7hacktargetingopera.htm

My theory is that because IE8 needs to see inside ordinary HTML comments to see if they are conditional, thus any comment is considered an element in the document tree.

* html = <!DOCTYPE> html
*+html = <!DOCTYPE>+html


The following markup

<div></div>
<!-- -->
<div></div>

is selected by 

div+*+div /* IE5~8/Win and IE/Mac */
div+div /* all other browsers */


By IE8 supporting conditional comments, it violates the support of adjacent sibling selectors. Look at my new test page template. The Honor roll is true to its order.

http://css-class.com/test/beta-0-1.htm

Dropping support for conditional comments in IE8 would render this page correctly. The only rescue I could use a present for IE8 is using the IE5 mac band pass filter which IE8 parses thus it would use my IE7 and IE/Mac style rules for the rescue.

http://css-class.com/cssscript/test-ie-all.css


To the IE team, please reconsider conditional comments and properly honor adjacent sibling selectors? The bonus is a clean break from the pass and old IE buggy behavior . Also well done, only five old IE7 bugs remaining in test cases on my site.

 
Alan

http://css-class.com/
Received on Thursday, 6 March 2008 15:20:28 GMT

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