Speed: Avoid CSS @import #10
Labels
bug
Something isn't working
enhancement
New feature or request
help wanted
Extra attention is needed
Describe the bug
Avoid using
@import
in CSS files as this prevents parallel loading of CSS. Inside a CSS file,@import
can be used to include the contents of another CSS file by specifying a URL. This can be convenient but impacts download times because browsers can only start fetching the imported URL after the CSS file containing the@import
has been fetched.To Reproduce
theme.min.css
wet-boew.github.io/themes-dist/GCWeb/GCWeb/css/theme.min.css (2 CSS imports)
Expected behavior
To get a page to load CSS files in parallel, we should instead add a
<link rel="stylesheet" href="...">
tag for each of the CSS files we need to load to the HTML code of the page.The text was updated successfully, but these errors were encountered: