News for hackers. Stuff that matters.
Re:CSS sucks because we don't bother learning it (2022) by nailer on Monday January 05, 2026 @10:59AM (#46500351)
You can prove that most people don't learn CSS using most LLMs: they're trained on github code.

A card with a top image, some text and a button - which should be...

- A card

- A top image

- Some text

- A button

ie 4 HTML elements, ends up being about 10 HTML elements with various strange hacks in the div-soup HTML the models have scraped from Github.

Then someone else comes along and uses tailwind, because naming 10 arbitrary HTML elements (rather than .card, .card img, .card p, .card button or similar) is hard. They're right, but the problem is they didn't need that many elements in the first place and wouldn't if they'd just learnt CSS.

Re:CSS sucks because we don't bother learning it (2022) by icedchai on Monday January 05, 2026 @11:04AM (#46500427)
This matches my personal experience. I am primarily a backend developer. Can you recommend a book that teaches CSS the correct way?
Re:CSS sucks because we don't bother learning it (2022) by nailer on Monday January 05, 2026 @11:34AM (#46500912)
I’d spend time on the CSS Grid and Flex playgrounds. Get used to creating layouts using grids and padding and gaps, leave block elements and margins to actual writing.
Re:CSS sucks because we don't bother learning it (2022) by Tomte on Monday January 05, 2026 @11:11AM (#46500509)
„CSS The Definitive Guide“ or „CSS in Depth.“
Re:CSS sucks because we don't bother learning it (2022) by Levitz on Monday January 05, 2026 @11:35AM (#46500932)
Is turnabout fair play? https://chatgpt.com/share/695be6f6-3188-800f-b2b0-e07cb196b6...

CSS has gotten much, much better, which is why it doesn't suck so much these days, but come on now, using a div with a background image was a common practice. There were like, what, 3 different hacks to center an element inside another?

People don't just opt for a plethora of different tools to deal with it "just because".

Re:CSS sucks because we don't bother learning it (2022) by nailer on Monday January 05, 2026 @05:22PM (#46505897)
Re:CSS sucks because we don't bother learning it (2022) by h_ko on Monday January 05, 2026 @11:09AM (#46500476)
So much this. The amount of unnecessary divs created by LLMs are an abomination. Let alone the blatant disregard for any semantic elements. Took a lot of strongly worded instructions to get rid of the bias for div-span-spaghetti, and it still slips in entirely superfluous elements.
Re:CSS sucks because we don't bother learning it (2022) by CPLX on Monday January 05, 2026 @11:10AM (#46500497)
LLMs are the new FrontPage it seems.
Re:CSS sucks because we don't bother learning it (2022) by moi2388 on Monday January 05, 2026 @11:02AM (#46500396)
I couldn’t agree more. Tailwind isn’t a solution, it’s a symptom.