5 ms·
That's a fairly reductive take on Tailwind. The motivation isn't because CSS is hard, it's because it doesn't match how web applications are commonly built toda
by deergomoo 3y ago
That's a fairly reductive take on Tailwind. The motivation isn't because CSS is hard, it's because it doesn't match how web applications are commonly built today (which makes sense; the web is still primarily a document platform we've bolted software onto).
When you're structuring an application around components—where a component is an encapsulated unit of layout, style, and behaviour—it doesn't make sense to start putting those three aspects in separate places. Under that model, you typically don't want stuff inside a component to be able to affect anything outside, which is where things like Tailwind, scoped styles, and various other recent styling tools start to make a lot more sense.
Now, you can argue whether or not that is a good way to build applications, but given it's how pretty much every desktop and mobile UI system works, I'm not inclined to say it's inherently wrong. It's just not a great match for the tools we have available to us on the web.
- xigoi 3y agoSoparation of data and style allows users to easily customize how your app looks, just like with documents. Using Tailwind is user-hostile.
- deergomoo 3y agoI'm sorry but that's just not a realistic concern for a developer to have. If it works, great, but I'm not going to base the architecture of my software around the desires of the 0.001% of users who even know that user style sheets exist.