When I started working on my project I didn’t really care so much about organizing my CSS file, but then I kept on adding ad-hoc selectors. Now I have 3048 lines of CSS code. I know I need to spend some time organizing this stuff and I know it will be much shorter once I do that since there’s really a lot of redundancy.
But currently it’s working fine (as it seems at least), and I just want to get the product out the door as soon as possible, so I was wondering, is this OK to have a long CSS like this and what are some of the critical drawbacks if any?
3048 lines isn’t that bad, but it could be reduced; I’ll give you benefit of the doubt and assume that you have a fairly complex site.
Super long CSS files start encountering problems in IE, which can only take a certain number of rules before it starts ignoring the rest.
Also, the longer the file, the more time it takes to parse – thus the longer it takes for your webpage to load.
Of course, with more rules comes more memory usage too.
That’s about it, really.