← Back to context

Comment by torginus

2 days ago

I am not 100% sure about that - I usually find AI written CSS to be slightly visually flawed and almost always logically flawed.

The way you write websites that actually work imo, is you understand how your chosen CSS layout engine works roughly, and try to avoid switching between layout modes - traditional to flexbox to grid to flexbox again down the tree can drive the most brillant devs utterly mad .

But seriously, after a certain complexity threshold, it becomes impossible to tell what's going on and why.

And if you don't think about it in advance, it's very easy to reach that threshold, especially if you don't get to write the whole page from scratch, but have to build on the work of others.

AI (and many frontend devs) do write-only CSS - they add classes until the code they write looks right.

But code like that tends to fall apart under multiple resolutions, browsers, screen sizes, devices etc.

I am not a frontend dev, and came pretty late to the frontend party. That said I felt that anything that obscures the raw CSS makes it much harder to deliver UI that works right, as it peppers hidden side effects across your code.

That's why I wasn't too keen on CSS frameworks like Tailwind - I found that when writing frontend code the writing part takes up the minority of the time, it's producing a well thought out layout flow is what is actually the biggest sink of time and effort.

That said, I'm not a frontend dev, and I'm to too good at CSS - but not horrible either - so I defer to the judgement of others who are pros at this, its just my opinion and experience.

> I usually find AI written CSS to be slightly visually flawed and almost always logically flawed.

Funny, this also qualifies most of the _human_ written CSS I've seen. !important all the things!