Remix.run Logo
montroser 4 days ago

The solution is already here, and it's totally fine: Use utility classes just for layout (margin, padding, etc); use scoped styles for your components; use a small set of globally available classes for styling native elements (buttons, etc) -- and you're good!

Vue and others have had scoped styles for a long time. Now @scope is spec'd with improving browser support. All this pain in TFA is from people flailing with all of the many bad options that pervade the React ecosystem.

pier25 4 days ago | parent | next [-]

This is how I write css.

In a couple of years people will wonder why anyone would use something like Tailwind.

owebmaster 3 days ago | parent [-]

The utility classes can be tailwind

pier25 3 days ago | parent [-]

Except that tailwind is a huge dependency. Not only it requires a compiler, but editor extensions, plugins, and learning a whole new language to express css.

owebmaster 3 days ago | parent [-]

not when you use unocss (and tailwind4, I think, but I don't use it).

omnimus 4 days ago | parent | prev | next [-]

I think this is good advice. I would say many people end up in that style. Downside is that you have to be pretty experienced with CSS to get this right as it doesn't always give obvious solutions. It's often "it depends".

4 days ago | parent | prev [-]
[deleted]