CSS imports aren't great for loading speed because they're necessarily a waterfall of requests. The browser has to load one file, start reading it, see there's an import, load that file, start reading it...
It's better if you can declare all your stylesheets up front in the document <head> so the browser can start loading them all in parallel.
CSS imports aren't great for loading speed because they're necessarily a waterfall of requests. The browser has to load one file, start reading it, see there's an import, load that file, start reading it...
It's better if you can declare all your stylesheets up front in the document
<head>
so the browser can start loading them all in parallel.More info here: https://csswizardry.com/2018/11/css-and-network-performance/#avoid-import-in-css-files