Re: [css-d] IE hacks - css conditions
On Saturday 26 June 2010 20:31, Alan Gresley wrote: Michael Adams wrote: 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. IE9 will have support for rounded corners. I will pass alpha PNG images to ie7 ie8. Or you could send invalid CSS (like the import hacks) that IE8 only sees. http://css-class.com/test/bugs/ie/ie8-parsing-backslash.htm I myself just do the best with IE8 without rounded corners. Some may not have that option. Mainly solved with a php include, at least now i only have to edit one file. -- Cheers __ css-discuss [cs...@lists.css-discuss.org] 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/
Re: [css-d] IE hacks - css conditions
Michael Adams wrote: 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. IE9 will have support for rounded corners. I will pass alpha PNG images to ie7 ie8. Or you could send invalid CSS (like the import hacks) that IE8 only sees. http://css-class.com/test/bugs/ie/ie8-parsing-backslash.htm I myself just do the best with IE8 without rounded corners. Some may not have that option. [snip] 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 1. http://blogs.msdn.com/b/ie/archive/2009/11/18/an-early-look-at-ie9-for-developers.aspx -- Alan http://css-class.com/ Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo __ css-discuss [cs...@lists.css-discuss.org] 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/
[css-d] IE hacks - css conditions
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 [cs...@lists.css-discuss.org] 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/
Re: [css-d] IE hacks - css conditions
Michael Adams wrote: Thanks for reading my rant - comments? The pleasure was mine - snifter of hemlock? Best, ~d http://chelseacreekstudio.com/ __ css-discuss [cs...@lists.css-discuss.org] 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/