Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As of http://code.google.com/intl/de-DE/speed/page-speed/docs/rtt.html#AvoidCs... Drupal 7 should not use @import to import the css files.
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commented@import is used only in non-CSS aggregation mode. This is done to workaround IE limitation with the number of
<style>
tags.Comment #2
jbrown CreditAttribution: jbrown commentedThat link is referring to @import in external stylesheets, not in the html.
I grepped the codebase and @import is not present in any CSS file.
Comment #3
gagarine CreditAttribution: gagarine commentedCSS added with @import are downloaded sequentially on IE 6 7 8:
"@import has a negative impact on web page performance"
http://www.stevesouders.com/blog/2009/04/09/dont-use-import/
"In IE @import behaves the same as using
at the bottom of the page, so it's best not to use it. "
http://developer.yahoo.com/performance/rules.html#csslink
So what should we do? We can display a warning if we go over the IE limitation? Or only use @import if we pass over the limitation (but when exactly downloading sequentialy is bad)?
What about using link for the first 28 CSS and after @import? This give 4 "spear" in case of hard coded CSS in tpl.
First we should certainly have less CSS! Lot of modules provide useless CSS than everybody overwrite...