Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
JTBringe6098yWell, I had a couple of CSS files that were around 16000 lines. Imported all the CSS for Material Design just to style a few buttons 😁
Yes, bad practice I know. -
Breaking CSS up into multiple, highly-organized lines like this is the only way I can make sense of things like Bootstrap.
-
20,000 lines of anything in a single file is bad practice, for CSS it should be split into multiple files and linked in the head section of the document (you can use CSSs import feature as well but this stops concurrent loading of stylesheets which isn't wise), or you can use a preprocessor like LESS or SAAS to manage everything nicely. Generally the more modern way is to use a preprocessor, have everything logically split into files for development, but when deploying to production concat everything into a single file (depending on a few other things)
-
wbhob2898yBruh, use sass. There's no possible way to manage all that code. Version control nightmare
-
KimDotSe7628yAre you sure it's not a lot of files concatenated? Because that would be kind of normal.
-
alternative to Sass would be to setup postcss, which you can choose what features you'd like to include.
Related Rants
Is... is this normal? 20k+ lines of CSS seems like overdoing it a little.
undefined
css
lots and lots of css
i have to go through all this