News for hackers. Stuff that matters.
Re:Knowing CSS is mastery to Front end Development by codetrotter on Sunday March 02, 2025 @08:53AM (#43230490)
> You can style stuff quickly and consistently right from the markdown, you don’t have to think of classnames for every teeny little thing, and you can somewhat imagine what stuff looks like just by looking at the jsx.

I still don’t understand what it brings over putting style= whatever on the element.

Re:Knowing CSS is mastery to Front end Development by mhitza on Sunday March 02, 2025 @09:09AM (#43230640)
> I still don’t understand what it brings over putting style= whatever on the element.

You can't put a style for dark mode and one for light mode. Lifting these properties from styles to classes allows you to combine them with media queries and states.

Re:Knowing CSS is mastery to Front end Development by codetrotter on Sunday March 02, 2025 @09:32AM (#43230847)
Sounded to me like parent commenter was not advocating for that sort of thing so much.

They said

> Like imagine your company’s main “button” element. It’s got 8 different sizes, optional icons on both sides, animations, styles, each needing to support different color combos. Tailwind is miserable for that. You get giant huge balls of spaghetti classes all over your button, and it’s pretty incomprehensible.

Which to me sounds like they would not use Tailwind for dark mode / light mode things either. But I might be misunderstanding

Re:Knowing CSS is mastery to Front end Development by wwweston on Sunday March 02, 2025 @10:33AM (#43231420)
It sounds like you're saying we need to consider the flexibility and articulation that classes enable when they reflect considerations beyond concrete presentation.
Re:Knowing CSS is mastery to Front end Development by Zardoz84 on Sunday March 02, 2025 @06:35PM (#43236490)
I just today, I helped to a junior that asked me how he can move a button on a toolbar. He was fighting against some legacy webapp made with JSPs, that have a f** zillon of style="XXX" stuff on nearly everything. And what is worst ... nearly everything using "position: absolute" to layout nearly everything.

Try to maintain that horrent webapp.

PD: That webapp it's what a ex co-worker called "technical bankrupt"