Not so much if something has changed over the past year or two, and since then we are still dealing with many of the same browsers, so you should not change your practice.
<link> is preferable in all cases compared to @import , since the latter blocks parallel downloads, which means that the browser will wait for the imported file to complete the download before it starts downloading the rest of the content.
You can see it here in great detail:
http://www.stevesouders.com/blog/2009/04/09/dont-use-import/
So, although @import may be convenient, that's all it offers. If you really want to use fast loading times, use the minimum number of stylesheets (perhaps in most cases), write good CSS with effective selectors (normal material), reduce it and use the <link> .
This will be a comment, but it is too long:
Instead of @import (I know this is very convenient), you should merge the files into one when your site goes live. In any case, you should not tune in this place, and there are a number of tools to help minimize it. Personally, using PHP, I have a configuration file where I define all CSS files that are written to a separate CSS file (the one that I will indicate in the <link> ), and then if the cached version is outdated (determined manually or automatically) , it combines / minimizes them and writes the contents to the cache file and returns a time line to add to the CSS file name to force the new version to be downloaded.
If you also use PHP, I highly recommend cssmin , it can parse the stylesheets for @import and pull the contents into a single file, and also handle all aspects of minimization.
Wesley Murch Aug 26 '11 at 2:16 2011-08-26 02:16
source share