I've been reading a lot of CSS optimizations lately, and I notice that almost every article recommends putting ALL of your styles in one file.
I understand what is behind it, but is it practical? I mean, Im works in a rather large project, and now I have a huge amount of styles. I think it will be very difficult to maintain everything in one file.
My question is: is the performance increase so large as to justify the complexity of having everything in ONE file?
Thanks!
Edgar.
UPDATE
To clarify , I'm sure CSS optimization is necessary. In fact, I have a process that minimizes and compresses CSS files, and I do everything I can to not repeat it myself.
I doubt the practice of using one large file and several files.
Let's look at the following example:
My application has several modules, for example: contacts, projects, accounting, HHRR, etc.
I have one CSS file for each module, plus several other common CSS files, such as: reset, layout, forms, etc.
When I use the CONTACTS module, I upload the shared files and the contact.CSS file. I skip the rest of the CSS because they are not needed.
Now, to math, let's say that each CSS file is about 10 KB,
My current way:
- About 50kb in shared files About 5
- uploads request in public folders
- About 10k in One client file
- download request.
This is only about 60 kilobytes and 6 download requests.
Single File Method:
- About 120kb (all files together, including styles that are not currently in use) in one file
- One download request.
So, in your opinion, the profitable profit from using one large file and only one download request justifies all the extra work on implementing the method of combining all files and all these problems?