Working together for standards The Web Standards Project


Chris Wilson, Group Program Manager for IE Platform and Security at Microsoft, and Position is Everything‘s Big John Gallant have been having a conversation about * html in Microsoft’s upcoming Internet Explorer 7 for Windows (IE7). Wilson has been encouraging CSS designers and developers to repair any bug-specific hacks for several months now. Gallant remains unconvinced the solution is that easy and is afraid countless, unpaid hours of repair work will wind up on the shoulders of those designers and developers who have employed * html related hacks in their designs.

Universal woe

Hacks for browsers typically do one of two things. They exploit a bug (a flawed implementation) or they exploit the complete lack of an implementation. In the case of * html the hack is based on a bug. Child selector hacks, on the other hand, are based on the fact that IE versions up to 6.0 do not include any implementation for child selectors whatsoever.

The popular Holly Hack and related IE workarounds exploit a browser bug in which the universal selector, *, in CSS is misinterpreted. The bug is present in multiple versions of Internet Explorer. The hack is used primarily to correct a number of layout issues related to IE’s proprietary layout model.

With the bug repaired, Wilson says universal selector-related hacks will fail in IE7′s strict mode (compliance mode). The bug remains present when IE7 is running in quirks mode, and in that mode, the hacks will understandably work. Wilson began advocating that the Web design and development community prepare for change back in October. Gallant wants to know how the changes will affect you via a poll at p.i.e..

Is the entire kafuffle a non-issue until we actually have IE7 and see what we really get? Or maybe we can learn from Tantek Çelik (Technorati, WaSP) who advocates that bugs including * html be repaired; and that implementations such as child selectors (which are often used in tandem with the Holly Hack), could be held off until a later date if necessary.

Exploiting a software bug to create a hack becomes dangerous as software is updated and bugs are repaired. While somewhat less danger exists when implementation issues are addressed, what happens when the implementation is introduced and it, too, is flawed? This is why hacks are so problematic, but just how these particular hacks in IE7 will affect the community is still vague.

Me, Me, Select Me!

The faulty interpretation of the universal selector is currently present in the following versions of Internet Explorer:

  • Macintosh: 5.0, 5.15, 5.21
  • Windows: 5.0, 5.5, 6.0

The bug is present in both quirks and standards mode in these versions. Here’s a look at what happens in these IE versions when the universal selector is involved:

Microsoft IE Browser Misnterpretations: Universal Selector
Selector IE Interpretation W3C Interpretation
* html html Matches no element (the html element is root and therefore never has an ancestor)
* * body * body Matches no element (body is the first child of html only)
* html body html body Matches no element

Have layout?

IE layout, which is IE’s determination of how elements are drawn, bound, and behave, has been a bit of a mystery for some time. This is largely due to lack of documentation and discussion about the issue. Dean Edwards (WaSP, WHATWG), Gallant and others went in search of better documentation for hasLayout. Markus Mielke, a Microsoft program manager working with Wilson, joined in the conversations which bore fruit.

Two good references that emerged regarding IE layout are On Having Layout and HasLayout Overview in which Mielke writes:

There are several bugs in Internet Explorer that can be worked around by forcing a layout (an IE internal data structure) on an element (like, dimensional bug fixes and Holly hack). Most users are not aware of the implications of having a layout applied to an element. – HasLayout Overview, Markus Mielke, Microsoft

Mielke’s article, which cites the input of Edwards, Gallant, Wilson and WaSP among others, goes directly to the heart of the * html concern.

Road to repair

Gallant says that the * html hack in CSS is “the only hack that is going to cause serious pain” and believes that the hack “could probably be retained without getting in the way of any actual support enhancements” that Microsoft has planned for IE7.

Wilson points out that the goal is to fix IE, and getting there is a process. “I want to remove the * html hack to make it useful . . . because it will then only apply to obsolete browsers.” He also shares a dislike for any hacks at all. “All CSS hacks are too risky in the long run, unless they only apply in orphaned or obsolete browsers, period. Tantek Çelik said this; I agree with it very strongly.”

Gallant states that the “time to kill the * html hack is when Vista arrives, presumably without the layout problem.” Wilson feels that fixing the browser is most important. “The Holly hack, and I say this with the greatest of respect, is an elephant gun solution. Sometimes it’s an elephant you’re trying to fix. Sometimes it’s a mouse. Some elephants are fixed in IE7, some mice are. We will not fix every possible layout issue in IE in IE7, however, and it’s unrealistic to expect we can do so.”

This entry cross posted to take your comments and trackbacks.

Return to top

Post a Reply

Comments are closed.


All of the entries posted in WaSP Buzz express the opinions of their individual authors. They do not necessarily reflect the plans or positions of the Web Standards Project as a group.

This site is valid XHTML 1.0 Strict, CSS | Get Buzz via RSS or Atom | Colophon | Legal