I'm an Information Systems student and I'm setting up an HTML / CSS training for my junior company, and during that assembly I had a question, what is the most effective way to organize CSS files?
In my opinion, there are 3 ways to organize your CSS:
First way: Use a global style
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
With CSS similar to:
.classe-arquivo1{
/* css */
}
.classe-arquivo2{
/* css */
}
.classe-arquivo3{
/* css */
}
Second way: Link all required CSS files
<head>
<link rel="stylesheet" type="text/css" href="arquivo1.css">
<link rel="stylesheet" type="text/css" href="arquivo2.css">
<link rel="stylesheet" type="text/css" href="arquivo3.css">
</head>
Each file with its respective CSS
Third way: A global file with changes that are repeated on all pages, using import to link other files
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
With CSS similar to:
@import url("arquivo1.css");
@import url("arquivo2.css");
@import url("arquivo3.css");
.classe-global{
/* css */
}
That said, my question is: What is the fastest way? And if there is no faster way, in what situations do I use each way quoted above?
This is my first question here in StackOverflow, I do not know if I asked the question correctly, but thank you in advance!