Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Wasn't CSS invented so we didn't have to write every html element "its blue, centered text and bold font" yet people willingly choose to use class="items-center font-bold text-blue-600" and running it through a compiler.

Tailwind is far from the first framework to require it. Bootstrap has things like .center and its entire basis are layout classes for the grid. its responsive by default, but not semantic.

I think CSS has failed because people want far more control on appearance (for branding and aesthetics) than the people devising it anticipated.

The motivation for semantic markup has also reduced because people write much less HTML. You might have some markup in what you edit, but the layout and base styles are usually generated by a system (e.g. a CMS). Even most people serving static files use a site generator.



I don't think CSS has failed - it's just a big and complex system for automatic layout. Automatic layout is hard, and if the age and power of CSS show us anything - is that it has succeeded. Comparing CSS of today to CSS of, say, 2005, is just night and day.

I don't think doing layout using other means (formatting specifiers? spacer elements?) would have been that much different, given that it's constraints all the way. The difficult bit is that the layout is not fixed - and it's a pain either way you do it, doing things well in InterfacerBuilder.app was also a struggle.

Yes, "center things" is ridiculous because you have to do it "4 different ways" with different tradeoffs - and there are some areas where things are still very painful (text-box-trim just now becoming available). But "failed"?.. that is a bit harsh.


Just like everything in good old Web, CSS was designed for documents, not interactive applications themes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: