A few years back i dropped conditional comments in favour of the CSS IE
@import hack[1][2][3]. Now i find myself in a position where i want to send
one thing to ie7 & ie8 and another to all other browsers.
What i want to do is give CSS rounded corners and opacity to all browsers that
support it. All current versions of IE do not support rounded corners -
though ie9 may in the future. I will pass alpha PNG images to ie7 & ie8.
Because of no PNG alpha support I may down the track add GIFs for <ie7 but
that is low priority. Amaya is the only other modern browser i am aware of
that does not support rounded corners (and people using Amaya for browsing
have much greater issues).
My main problem with conditional comments is that for a small but growing non
CMS website *each existing webpage needs to be edited one by one*. With CSS
hacks the hack modification affects the whole site instantaneously. With the
advent of IE9 i don't want to have to backtrack and edit every page.
Unfortunately we cannot pre-guess what CSS hacks will work so i find myself
in the position where i may have to return to using conditional comments. I
just wen't to re-learn this lost tool and Microsofts very first sentence on
the topic rankles[4]. "One of the most common operations performed in a Web
page is to detect the browser type and version."
I would have to use:
<!--[if (gte IE 7) & (lte IE 8)]>
<link href="iePNGalpha.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if lt IE 7]>
<link href="ieGIF.css" rel="stylesheet" type="text/css" />
<![endif]-->
All of a sudden i find myself in a position where i want to push for CSS
conditionals like:
@import url("iePNGalpha.css") IE7;
Thanks for reading my rant - comments?
IE @import hack:
I first found here
[1] http://annevankesteren.nl/2005/10/ie-import-hack
more
[2] http://imfo.ru/csstest/css_hacks/import.php
good reasons
[3] http://www.gunlaug.no/contents/wd_additions_12.html
Grr... conditional comments first sentence:
[4] http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx
--
Michael
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/