Ask HN: LLM struggles to center div too?

4 points by divan a day ago

I used AI coding agents for the past half a year a lot with Flutter. Recently I had to work on the tailwind web project, and I was surprised how often it gets layout/UI wrong. Even with puppeteer attached, haveing access to raw HTML output and screenshots, it's still struggles to do simple alignment, centering things.

In a way, it mirrors famouse "centering div in css" challenge, but I wonder if it's the same experience for other people who work with web stack more often.

sky2224 14 hours ago

Been using Claude Sonnet 4 for a web app that's using React, Mantine, Vite, and a NoSql db.

Frankly, it's been incredible. The app is not complicated by any means. It's a really simple CRUD app for tracking animals (what farm animals are on, breeds, medical history, birthing schedule, etc.), but when I've provided mockups, it's done a surprisingly good job to at least get me 80%-90% of the way there.

I think it has to do with my tech stack honestly. Well built components can get an individual developer with poor FE experience quite far. I think it's the same for AI as well at this point.

geophph a day ago

Yes I’ve grumpily wasted far too much time on debugging reasonably basic layout things with AI and getting nowhere.

alexander2002 a day ago

AI is really bad at fe.

  • muzani 20 hours ago

    Claude is exceptionally bad at FE; it has hardly improved since Claude 3 while everything else has made strides forward.

    GPT seems legit multimodal, as in images and text in the same space, and it can maneuver FE at the level of an experienced engineer.

  • dv_dt a day ago

    Ai is ok at fe but to me seems best at raw html and ironically can really struggle with css and some frameworks and design systems

    Im guess it has the most training samples on raw html followed by react, etc

  • throwaway019254 a day ago

    I had much better success with FE than with BE.

    Does it mean AI is really bad at FE and even worse at BE?