sure, but both of those are significantly better than a css file. tailwind tends to match the internal structure better, css in js tends to match the component structure better.
tailwind doesn’t have a runtime though, where css in js libs generally do. not that that’s a big point. the difference is mostly preference
I have yet to hear a good reason to use tailwind instead of a CSS file
it matches the component model of react etc
I personally don’t see it?
CSS in JS match the style more closely imo
sure, but both of those are significantly better than a css file. tailwind tends to match the internal structure better, css in js tends to match the component structure better.
tailwind doesn’t have a runtime though, where css in js libs generally do. not that that’s a big point. the difference is mostly preference
Doesn’t react have scoped styles like vue does?
yeah but you still basically end up duplicating the internal structure of the react component but in a css file then.
there’s nothing definitive that makes one of those 3 options better, it’s all preference. any of them fit better than global css though