0

I am new to web development and I'm doing a project. my question is if I create more than one css file and then include them all to the main style.css that would result heavy to load when it will be online or it's a good practice? Thank you so much for your help <3

  • Does this answer your question? [Is it possible to include one CSS file in another?](https://stackoverflow.com/questions/147500/is-it-possible-to-include-one-css-file-in-another) – Michael Rogers Apr 08 '22 at 15:54

1 Answers1

0

First of all this is related to

Best way to include CSS? Why use @import?

In my personal experience I previously liked to use that practice because it reduced the amount of tags in my html, however, nowadays you can set several properties like asynchronous loading which is not possible from @import, not to mention that opening the secondary css sheets becomes more difficult, it is not as easy as viewing source code and clicking on styles.css so as mentioned in the related article it could be a good option but not a rule and not a recommended option.

DANNGZSHOT
  • 74
  • 3
  • thank you so much for your reply! so I now know that I must use only one css file! do you mean make asynchronous loadings with js? sorry I'm new and I'm still learning – danilo marchesani Apr 12 '22 at 12:12
  • Exactly as with js this is an article so you can read more information about this: https://www.filamentgroup.com/lab/load-css-simpler/, and don't worry everyone when we start we all have many questions and here is the community to support us. – DANNGZSHOT Apr 13 '22 at 16:05