Conditionally IE7 and @opera rules
Saturday, 30. July 2005, 14:19:43
As Olli mentioned, Chris Wilson has expounded on important interoperability bug fixes in the future IE7. This list of bug fixes will remove a lot of cross-browser headaches, but ironically fixing them will also add some new ones.
CSS can to a large degree adapt to browsers with a wide range of capabilities by virtue of its compatibility rules. Even proprietary extensions like IE's filters cause no problem with other browsers, they just ignore them. Unfortunately implementation bugs can ruin this cross-browser harmony. Netscape 4 had some notorious bugs, including crashes, that set back the uptake of CSS for years. It can also be hard do design around the lack of some crucial features like CSS selectors.
With an IE7 with substantially less CSS 2.1 bugs than IE6 but substantially more than Opera/Firefox/Safari (none of which are completely bug-free, though I would claim we are quite good), there is one more browser combination to work around.
The saving grace is IE's excellent conditional comments. They prevent much uglier CSS hacks that would otherwise be used. CSS hacks practically always have unintended side-effects. They also stick around long after their sell-by date, and they are plain ugly.
I sometimes wonder if we should have similar conditionals. It is fairly hard to make rules that target Opera 8 exclusively. Some have used capabilities like us being the only browser supporting Media Queries right now, but this will have negative consequences. We could add some sniffability ourselves, like e.g. @opera 8 {/* Only processed by Opera 8, ignored by all other compliant browsers */} or even conditional comment support of our own.
Then I remember how much I detest browser sniffing, which over time seems destined to cause more harm than good, and come to the conclusion that encouraging this will likely not be in our own best interest or of the Web at large.
CSS can to a large degree adapt to browsers with a wide range of capabilities by virtue of its compatibility rules. Even proprietary extensions like IE's filters cause no problem with other browsers, they just ignore them. Unfortunately implementation bugs can ruin this cross-browser harmony. Netscape 4 had some notorious bugs, including crashes, that set back the uptake of CSS for years. It can also be hard do design around the lack of some crucial features like CSS selectors.
With an IE7 with substantially less CSS 2.1 bugs than IE6 but substantially more than Opera/Firefox/Safari (none of which are completely bug-free, though I would claim we are quite good), there is one more browser combination to work around.
The saving grace is IE's excellent conditional comments. They prevent much uglier CSS hacks that would otherwise be used. CSS hacks practically always have unintended side-effects. They also stick around long after their sell-by date, and they are plain ugly.
I sometimes wonder if we should have similar conditionals. It is fairly hard to make rules that target Opera 8 exclusively. Some have used capabilities like us being the only browser supporting Media Queries right now, but this will have negative consequences. We could add some sniffability ourselves, like e.g. @opera 8 {/* Only processed by Opera 8, ignored by all other compliant browsers */} or even conditional comment support of our own.
Then I remember how much I detest browser sniffing, which over time seems destined to cause more harm than good, and come to the conclusion that encouraging this will likely not be in our own best interest or of the Web at large.