Re: @import

> What is the real difference between using '@import' for external style
> sheets or 'link rel='? They both do the same thing no? DO they rank
> differently in the cascade, etc..??

As far as I know, the correct behavior of imported CSS would be to offer the
user a choice amongst the available <link /> stylesheets and ignoring the
others, and continue the cascade from there (if there are several imported
files, from top to bottom). So, on pages where I'm after the cascade, I may use
the <link /> element for the first stylesheet in the cascade, but anything I
want to follow is imported.

Note: '@import' is not recognized by older browsers. But thus you can link
to a stylesheet created for older browsers, and then use '@import' to include
a CSS reference which contains styles supported only by newer browsers (and
you can waive on any browser detection etc.). The styles in the imported sheet
will supercede those in the linked one because they come after the linked
sheet in the code, while older browsers will just ignore the '@import'
directive.


Regards,
 Jens.


-- 
Jens Meiert

Steubenstr. 28
D-26123 Oldenburg

Mobil +49 (0)175 78 4146 5
Telefon +49 (0)441 99 86 147
Telefax +49 (0)89 1488 2325 91

Mail <jens@meiert.com>
Internet <http://meiert.com>

Received on Saturday, 28 June 2003 13:29:45 UTC