Ingo Chao wrote:
> Guillaume wrote:
>> I'm using an @import filter to fire my css... Now I would like to
>> reset those styles for Ie 5.0 for example, to make sure he only has
>> the text version and no styles at all... I thought throwing to this
>> browser an empty style sheet through conditional comments... But
>> apparently it doesn't work this way...
>
>
> Els and Georg already answered this.
>
> Another attempt would use the invalid "Downlevel-revealed Conditional
> Comments" [1]
>
> Say we want to have text for IE in red, all the others should display it
> in green -- and we cannot override it for some reasons.
>
> ie.css
> p{color: red;}
>
> others.css
> p{color: green;}
>
>
> <p>Red in IE-Win, green for the others</p>
>
>
> This could be done with a "normal" (downlevel-hidden) CC, followed by a
> downlevel-revealed Conditional Comment.
>
> <!--[if IE]>
> <link rel="stylesheet" href="ie.css" type="text/css" />
> <![endif]-->
>
>
> <![if !IE]>
> <link rel="stylesheet" href="others.css" type="text/css" />
> <![endif]>
>
>
> This works as desired, the other browsers see a normal HTML comment,
> then they just skip two unknown tags (<![if !IE]> and <![endif]>) and
> let the p render in green.
>
> But the downlevel-revealed Conditional Comment does not validate.
>
>
> Now how to turn this into something ugly but valid.
>
> It seems like IE does parse a downlevel-revealed nested in a
> downlevel-hidden CC, meaning that this invalid intro and ending
>
> <![if !IE]> and <![endif]>
>
> could be nested, for validations sake, in a "normal" CC
>
> <!--[if IE]>
> <![if !IE]>
> <![endif]-->
>
> <link rel="stylesheet" href="others.css" type="text/css" />
>
> <!--[if IE]>
> <![endif]>
> <![endif]-->
>
>
> Both blocks are two simple comments for normal browsers, therefore, what
> is in between can be seen by them.
>
> IE, however, does interpret the first block as the beginning of a
> downlevel-revealed Conditional Comment, and the second block as its end.
>
> The following first block is only seen by IE, the second block is only
> seen by the others.
>
> <!--[if IE]>
>
> <link rel="stylesheet" href="ie.css" type="text/css" />
>
> <![if !IE]><![endif]-->
>
> <link rel="stylesheet" href="others.css" type="text/css" />
>
> <!--[if IE]><![endif]><![endif]-->
>
>
>
> But it validates.
>
>
> This is new to me, and I would appreciate some testing.
> http://www.satzansatz.de/cssd/drcc/drcc.html
>
> This one, at least, works for me in IE7, 6, 5.5
> and IE's parser seems to recover well from this.
>
>
>
> Ingo
>
> [1]
> http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp
>
Ingo,
It was all new to me too, although I seem to recall reading about it at
a time I didn't need it. I tried your page, and it certainly works for
me in FF 1.5.0.2, Opera 8.54, Mozilla 1.7.11, and IE6.
Tim
--
Tim Dawson,
Isle of Mull,
Scotland
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/