Paul Novitski wrote:
My point was simply that IE's conditional comments -- and ugly they are, no argument there -- are more likely to work as intended in a few years than hacks like * html.

* html hacks will continue to work in IE6 forever, just as they do today. We already know this filter has been fixed in IE7 (standards mode), and so the following are exactly equivalent:

<!--[if lte IE 6]> ... <![end if]-->
* html foo { ... }

(In the case of IE7 quirks mode, * html will still apply whereas the conditional comment would not. In fact, since IE7 quirks mode will be very close to IE6 quirks mode, * html would be better because it would be very likely that the patch will still be required.)

So, any argument that stating that conditional comments are more future proof is a myth. In fact, if you're not careful with conditional comments, they can be more dangerous. Consider the following:

* html #content { height: 1%; }

<!--[if IE]><style>#content { height: 1%; }</style><![end if]-->

The * html hack will only apply to IE 6 and earlier. That particular conditional comment will apply to all versions of IE since IE5 (when conditional comments were first added).

If IE7 fixes the limitation from IE6, I'm sure you would agree that the patch should not apply to IE7 and, therefore, the use of a filter which does not apply to IE7 is the better option.

The most effective future proofing method we have is to ensure that any hacks we do use today do not inadvertently target any future browser. It is better for future browsers to receive fully standards compliant CSS, then for them to apply patches intended for and only tested in current browsers.

If the fate of * html was not yet known then I would agree that conditional comments with a version number specified are safer, but since we do know that * html is equivalent to [if lte IE 6], both are completely safe.

--
Lachlan Hunt
http://lachy.id.au/
******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to