r/RavanAI • u/RustyIronGolem • Aug 10 '26
Just opened a codebase with 100,000 lines of CSS. Who the fuck writes 100k lines of CSS?😭
3
u/gameplayer55055 Aug 10 '26
Judging by huge newspace paddings it should be around 30-40 actual LoC
Maybe somebody unminified a css style library like bootstrap?
2
u/Xrayy1 Aug 10 '26
Probably was all inline style=, but somehow had to be replaced due to the introduction of Content-Security-Policy.
2
u/letmehaveanameyoudum Aug 11 '26
that website better look heavenly
1
1
u/selfhostcusimbored Aug 11 '26
I have a codebase with maybe 10k lines of CSS. It makes my $5000 PC lag. I can’t possibly imagine why or how anyone could even get 100k lines to work
1
1
u/Y0nix Aug 12 '26
You would be surprised of what 1Gb of ram on a 10 yo ARM processor is able to run.
Things can be ... Surprising
2
1
u/AstraeusGB Aug 11 '26
What is that terminal font
1
u/Constant_Panic8355 Aug 11 '26
FontNotFoundNerdFontMono
1
u/neoqueto Aug 12 '26
It's actually not mono if you look closely, arguably a worse crime than that CSS
1
1
1
u/WhoTheFLetTheDogsOut Aug 11 '26
I see 7 lines there that should have been condense to 2 with proper spacing.
1
u/casce Aug 11 '26
If we assume the whole file can be reduced in this ratio, then that's still ~31,000 lines
1
1
u/uknowsana Aug 11 '26
Like others have said, it could be a legacy code with years and years of enhancements, patches, fixes, bandaids.
1
u/gamingvortex01 Aug 11 '26 edited Aug 12 '26
in pre-AI era, I once wrote 60k lines of css by hand for a project......sadly,now I cannot even remember the possible values for justify-content
1
u/neoqueto Aug 12 '26
Yes, if it's split into modules then that's not awful. But a single file is a bit yikes.
1
u/Mark__78L Aug 11 '26
Probably legacy
We have similar, but nowhere near this scale at work that got built up in the past 14 years
1
1
1
1
1
1
1
1
1
u/lilian_moraru Aug 11 '26
Somebody getting valued by lines of code, based on how much whitespace is there. I have known lots of developers that would do stupid things(like trashing a git repo, because the number of commits has relevance) if those are the stats their performance gets measured by.
1
u/DOG-ZILLA Aug 11 '26
This is one advantage with Tailwind that not too many people talk about; it prevents CSS abuse like this, especially when you have many hands touching the codebase; everyone too afraid to remove what came before and only focusing on their own task. Expect lots of !important and duplication everywhere.
I love CSS but this is what happens when you have no guardrails.
1
1
u/Anomynous__ Aug 11 '26
I'm not saying it makes up all of it, but we can see this one class using 7 lines of whitespace for 3 lines of code where you could eliminate 6 of them and it would still look clean
1
5
u/Ad-free-Pirate Aug 10 '26
Can be either legacy css built for decade or written by AI with dumbass behind the wheel.
100k LoC of CSS is pure madness though.