Sent by Liorean on 18 July 2002 08:08
At 13:59 2002-07-17 -0300, Chai Chassot wrote:
>I might be getting on this discussion a little late, but one point that
>didn't seem clearly pointed out here is that the /*/*/ hack will hide
>only from N4, whilst @import will hide from mostly all < 5.0 browsers.
>They have different purposes.
>(There's however no way of hiding from all 4.x IEs (win & mac) because
>each supports different @import syntaxes.
Seen the high pass filter by Tantek
<http://www.tantek.com/CSS/Examples/highpass.html>? It does the hiding from
browsers<5. It does hide from IE5/5.5Win also, though. (An indication that
they might not belong together with the so-called fifth generation browsers
after all).
>I ran some tests on this
>matter, but still owe css-d a final report)
Sorry about resending stuff I've sent here before, but here you have such a
test of @import syntax. Now, there's even more stuff to take into count, as
IE4 and some others behave differently depending on whether it's a relative
url, absolute url or a relative to a file in the same directory.
Also, IE4 as left behind when IE5 has been installed works differently than
IE4 alone, as does the browser if you ever upgraded the JS engine (Which
might be done automatically and without notice by other products, MS or
otherwise, as well as manually).
Cyan > Defined by @import "<URL>";
Yellow > Defined by @import url(<URL>);
Magenta > Defined by @import url("<URL>");
Red > Defined by link
Blue > Defined internally
Green > Defined inline
C Y M R B G
Ie6Win yes yes yes yes yes yes
Ie5.5Win yes yes yes yes yes yes
Ie5Win yes yes yes yes yes yes
Ie4Win no yes yes yes yes yes
Ie5.5Mac B yes yes yes yes yes yes
Ie5.1.3Mac yes yes yes yes yes yes
Ie5Mac yes yes yes yes yes yes
Ie4Mac yes yes no yes yes yes
Mozilla yes yes yes yes yes yes
Ns6 yes yes yes yes yes yes
IceStorm5.1.1 yes yes yes yes yes yes
Nn4.x no no no yes yes yes
Op6 yes yes yes yes yes yes
Op5 yes yes yes yes yes yes
Op4 yes yes yes yes yes yes
Konqueror yes yes yes yes yes yes
iCab2.6 yes yes yes yes yes yes
URL for testing: <http://www20.brinkster.com/liorean/tests/cssimport.html>
>Notice that the empty rule (a{}) after the /*/*/ is because O5/mac
>ignores the first rule after the comment. If you don't care about this
>browser, you can just ommit it.
I saw someone had a fix for this problem involving nesting some more
comments, somewhere. Might be on list.
>Notice also that this hack can be used in the style attribute (
>style="/*/*/ properties..." ). Something I find a lot useful, but that
>doesn't get that much attention.
Why use the style attribute at all? I've not seen many uses for it, and
those I've seen mostly exist because of IE's bad compliancy. (Isn't it far
easier to look through a css file all nicely formatted and commented up
than finding the corresponding passage in the html file?)
// Liorean