RE: IE8 using conditional comment violates the support of sibling selectors

Without giving too much away I think it is safe to say this particular issue will be fixed. It breaks sibling selectors, :first-child, in the future would break :nth*, and makes the selectors API available right now in Beta 1 inconsistent with other implementations.

Justin Rogers [MSFT]

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Alan Gresley
Sent: Thursday, March 06, 2008 7:20 AM
To: www-style@w3.org
Cc: Chris Wilson; Eric Lawrence; Alex Mogilevsky
Subject: IE8 using conditional comment violates the support of sibling selectors


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 17:35:58 UTC