Re:Get the hell out of the LLM as soon as possible
by wruza on Tuesday April 01, 2025 @12:42AM
(#43542918)
I'm afraid that css is so broken that even AI won't help you to generalize centering content. Otoh, in the same spirit you are now a proficient ios/android developer where it's just "center content - BOOM!".
[ Parent
| on HN ]
Re:Get the hell out of the LLM as soon as possible
by bawolff on Tuesday April 01, 2025 @12:49AM
(#43542955)
I know this is a meme but centering a div is really not hard.
15 years ago it was just a google away, im sure AI can handle it fine.
Re:Get the hell out of the LLM as soon as possible
by wruza on Tuesday April 01, 2025 @01:02AM
(#43543017)
Why do you think this is only a meme? Flow modes, centering methods and content are still at odds with each other and don't generalize. This idiotic model cannot get it right unless you're designing for a very specific case that will shatter as soon as you bump its shoulder.
Edit: I've been in the AI CSS BS loop just a few days ago, not sure how you guys miss it. I start screaming f-'s and "are you an idiot" when it cycles through "doesn't work", "ignored prereqs" and "doesn't make sense at all".
Re:Get the hell out of the LLM as soon as possible
by crooked-v on Tuesday April 01, 2025 @02:25PM
(#43549950)
Just do everything with flexbox. https://flexboxfroggy.com is a good example of what's possible
Re:Get the hell out of the LLM as soon as possible
by wruza on Tuesday April 01, 2025 @03:06PM
(#43550312)
What if I have text nodes in the mix? And I don't know that in advance, e.g. I'm doing <div>{content}</>? What if this div is in a same-class flexbox and now its margins or --vars clash with the defaults of its parent, which it knows nothing about by the principle of isolation? Then you may suggest using wrapper boxes for all children, but how e.g. align-baseline crosses that border is now a mystery that depends on a bunch of other properties at each side.
Your reply is correct, but it's exactly that "just do this specific configuration" sort of correct, which punctures component isolation all the way through and makes these layers leak into each other, creating a non-refactorable mess.