To fix the css + jsx in one file, just write your styled components at the bottom of your component.
If you ever seen a react component completely riddled with Tailwind, you'll realize how messy and uncoordinated it looks.
Even I would consider switching between two files just to avoid that style of css.
Furthermore the necessity to utilize horizontal scroll because adding 10+ more rules will inevitably break your prettier printWidth rule is, by far, the most annoying aspect of Tailwind.
Consider these two snippets, after time of not looking at your css code, do you think 10+ rules on one line is maintainable?
Not even close, ask yourself to change a css property - you would have to iteratively go from left to right until you find it, whereas looking from top down you can immediately catch the css rule you want to find.
Succinct doesn't mean maintainable, and sometimes verbosity does.
To fix the css + jsx in one file, just write your styled components at the bottom of your component.
If you ever seen a react component completely riddled with Tailwind, you'll realize how messy and uncoordinated it looks.
Even I would consider switching between two files just to avoid that style of css.
Furthermore the necessity to utilize horizontal scroll because adding 10+ more rules will inevitably break your prettier printWidth rule is, by far, the most annoying aspect of Tailwind.
Consider these two snippets, after time of not looking at your css code, do you think 10+ rules on one line is maintainable?
Not even close, ask yourself to change a css property - you would have to iteratively go from left to right until you find it, whereas looking from top down you can immediately catch the css rule you want to find.
Succinct doesn't mean maintainable, and sometimes verbosity does.
Tailwindcss isn't even close to being the future.