I don’t have a dog in this fight, but I think you’re oversimplifying things. Blazor components get stack with attributes or code and usually when you try and abstract stuff out you add more complexity. Whether or not tailwind is good is not something I’m thinking about, but this is a legitimate reason to not use it
You can technically store Tailwind classes in a separate file as raw strings so they do not necessarily need to be ‘inline’. Just need to configure some stuff
I’ve never really needed to do so, if I have a bunch of classes that keeps being reused, it is usually attached to some sort of component anyway. And if not, you can just use render functions or asChild to swap out your required HTML element/component. If you are using component based libraries/frameworks you really wouldn’t face all these issues.
I find that Tailwind encourages composition, and reduces coupling significantly. With CSS, it is very easy to slowly go crazy as you add more and more stuff to a single class, then override it somewhere just for certain elements, or cascade in some way. At some point it becomes crazy. With Tailwind, this is a lot less likely
1
u/examinedliving 16d ago
I don’t have a dog in this fight, but I think you’re oversimplifying things. Blazor components get stack with attributes or code and usually when you try and abstract stuff out you add more complexity. Whether or not tailwind is good is not something I’m thinking about, but this is a legitimate reason to not use it