DEV Community

Discussion on: How does @import works in CSS? What is the pros and cons. 🤔

Collapse
 
po0q profile image
pO0q 🦄 • Edited

hello,

Although the time difference is very small

It depends on the amount of CSS you import. @import will trigger additional work.

Using several <link> is better, as the browser can download stylesheets in parallel. As a general rule, it's actually safer and easier than any use of import.

Collapse
 
jasmin profile image
Jasmin Virdi

Thanks for adding up!🙌