More IE7 CSS Info

The official IEBlog this week brought us news and details of some of the future changes to te IE CSS parser to go along side of what we already know about their planned changes to standards support.

We’ve already started talking about a few of the CSS changes that are going to be available in IE 7 when we release, but there are a few hanging points that we haven’t talked about yet or haven’t covered completely. There are 3 specific items I’d like to talk about:

  • Using the root node wild card selector for IE only rules (* HTML) [strict mode only fix]
  • Multi-class selectors as defined by CSS 2.1 (.floral.pastel) [strict mode only fix]
  • Pseudo-element parsing sometimes flags rules as invalid (P:first-letter{ color: red; }) [strict/quirks mode fix]

This is good news for the future of the browser landscape allowing developers to do a lot of things that we may not have the ability too, but more often have had to work around in some fashion adding unnecessary bulk to code.

But it does raise some important concerns about compatibility of existing code and the use of so called “CSS hacks”. Myself, while I’m really not a fan of littering my documents with CSS hacks and try to avoid use of them at most costs I do find that I often use some of the simpler ones like the use of selectors that IE5 & IE6 may not understand to change or add some extra styling. Here’s a simple example to deal with IE’s lack of min-height support:

div { height:200px; }
body>div { height:auto; min-height:200px; }
</pre>
<p></p>


Now, this makes perfect sense during the era in which we had one class of browsers that supported both min-height and the child selector and another class that did neither. But if there is no min-height support in <span class="caps">IE7 </span>(one thing I have not seen mention of yet) then any pages out in the wild may &#8220;fail&#8221; in one fashion or another as <span class="caps">IE7 </span>picks up on the respecified height, but continues to ignore the min-height declaration.

Comments Temporarily(?) Removed