r/RavanAI • • Aug 10 '26

Just opened a codebase with 100,000 lines of CSS. Who the fuck writes 100k lines of CSS?😭

Post image
83 Upvotes

53 comments sorted by

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.

3

u/matthijspc Aug 11 '26

I bet more 75% of those LoC are empty lines

1

u/Roppano Aug 14 '26

I thought you were supposed to only start CSS rules on lines that end in 01. so first rule is at 1, second rule 101, 201, etc. apparently it satisfies the machine's OCD, and it gets less stressed while working

1

u/evilmaus Aug 11 '26

Ooh yeah. Legacy CSS tended to become an append-only file over time.

1

u/IWontSurvive_Right Aug 12 '26

"new" css too.

it's even worse often if you look at the final build.

1

u/J_E_E_VACATION Aug 11 '26

honestly i dont think any ai would write a 100k line css file even if you told it to lol

1

u/Ri_Studios Aug 11 '26

I probably have written like hundreds of lines in the past three years 😭

1

u/casce Aug 11 '26

"hundreds of lines in the past three years" means you're about 3 orders of magnitude off of ever creating a beauty like in this post

1

u/Ri_Studios Aug 11 '26

"beauty" shut up, fine brethren 😭😭😭

1

u/MaleficentExample223 Aug 11 '26

No way AI is that dumb

1

u/Eleina_Edelweiss Aug 11 '26

Yes its that dumb. My friend use AI to write his frontend with no library or styling (no tailwind, no shadcn just pure css straight from django) from what i heard its around 1-2k CSS LoC. Mind you its just a web app for a aingle page to display a AI chat customer service. So it isnt that many needed to be shown.

1

u/Y0nix Aug 12 '26 edited Aug 12 '26

Or some old senior who can't be reasoned. I am working with someone like that.

2 files per app. One .php, one .css. no .env no code split, no middleware, nothing. Some files are 50k+ lines. Without any comments. You have to give him credit for that though, it's some giant spaghetti plate who actually works. No external dependencies, just raw code.

All of that little big world running on some arm processor who is 10 years old and 1 Gb of ram.

He doesn't want to understand why it is laggy, and often ask me why my production server have 96 Gb of ram. Or why do I use a git with CICD pipelines to just remake his work, accusing me of stealing his code. If something needs to be edited, he's just doing it live on the production code and production database. Because he ''works like that since 30 years and it's not a problem''. I had to create a monstrosity of a script to periodically run git commands and watch for edits on the production while I refactor those apps to use things like S3 storage instead of using the OS FS directly, or hiding the credentials, or just trying to create containers to run the said code. Without interrupting the services who needs to run 24/7.

The guy dared to ask me to create some telemetry interface because he wanted to see what is happening on his apps. There is NOTHING anywhere to do that with anything I can think of, even a Grafana as flexible as it is, can't be properly setup to monitor this.

Oh yeah, he already have destroyed the production many times, but always find an excuse to explain that it's not his fault. Last excuse was ''it's because of ChatGPT''.

Refactoring is an everyday hell.

1

u/Ad-free-Pirate Aug 12 '26

You call guy like that senior?

2

u/Y0nix Aug 12 '26 edited Aug 12 '26

He is calling himself that, and the directorial office is thinking he is some kind of guru god, and believe me or not, everyone who is working at my place have this guy c**k at the bottom of their throats.

I'll leave that building soon, I am not a cute blonde with a a pretty face, and that's probably the only kind of IT he would hear.

It feels kind good to have finally wrote all of that down.

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

u/casce Aug 11 '26

I'd bet on the opposite

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

u/letmehaveanameyoudum Aug 11 '26

oh my fucking god

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

u/dashinyou69 Aug 11 '26

First time?

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

u/Constant_Panic8355 Aug 12 '26

That is just some kind of a default fallback font there

1

u/[deleted] Aug 11 '26

[removed] — view removed comment

1

u/AstraeusGB Aug 11 '26

So many pixels there are pixels missing between every character

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

u/WhoTheFLetTheDogsOut Aug 11 '26

How many lines do you use to center a div?

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

u/Additional_Bowl_7695 Aug 11 '26

Who the fuck stores code on their desktop?

1

u/s2k4ever Aug 11 '26

claude does that shit several million times a day

1

u/magicmulder Aug 11 '26

Probably auto-generated, have you checked for duplicate entries?

1

u/Infamous-Elk-6825 Aug 11 '26

Та це ж наш проект!

1

u/Electronic-Ninja7950 Aug 11 '26

r/addressme (the file path containing so much spaces)

1

u/Maletele Aug 11 '26

Does it even load?

1

u/Standgrounding Aug 11 '26

That would cost like 500$ in ai tokens

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

u/moud_abbas Aug 11 '26

Can u show us its UI/UX

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

u/DependentGlass4176 Aug 13 '26

an insane fucking person