On 16/04/2008, James Leslie <[EMAIL PROTECTED]> wrote:
> -----Original Message-----
>
>  More realistic example: assume you want to use css 2.1 selectors (those
>  which are supported even by IE7). This makes it necessary to hide the
>  rules from IE6 and as a consequence you will end up with 2 very
>  different stylsheets: one for IE6 and below and one for IE7 and Firefox
>  etc. This could be done with
>
>  <!--[if IE]><![if IE 7]><![endif]-->
>  <style type="text/css">
>  css for Fx, Opera, Safari and IE 7
>  </style>
>  <!--[if IE]><![endif]><![endif]-->
>
>  <!--[if lte IE 6]>
>  <style type="text/css">
>  css for IE 6 and IE 5.5
>  </style>
>  <![endif]-->
>
>  I'm not going to say thats beautiful or standards conform. But that is
>  the documented proprietary selection mechanism called "conditional
>  comments" for IE.
>
>
> -------------------------------------------------------
>
>  But in this example IE6 won't understand the CSS2.1 selectors and so
>  will ignore them....
or misinterpret it. In fact it will be impossible to make IE6 behave after fed
with lots of advanced selectors.

>  Therefore we just add some extra commands in an IE6
>  specific conditional comment so that IE6 displays the element in a
>  suitable way. Isn't that pretty much the principle of graceful degradation?

>  I personally use CC's on every site to deal with IE quirks, but wouldn't
>  dream of trying to hack a (MS proprietary)conditional comment to feed
>  stylesheets to other browsers. It seems very unsafe in terms of future
>  proofing to me.
The CC is targeting _only_ IE and no other browser, of course. The first CC
is only there to prevent IE's other than IE 7 from reading the css. For the
"other browsers" there are simply 2 comments, one before and one after the
<script> element and for sure the construct validates.

You will love the idea to use css 2.1 selectors almost freely and not
have to think what
a mess it will be for IE6. Of course you will always be free to add a
common css on top.

Hope this helps,

Manfred
______________________________________________________________________
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/

Reply via email to