• brian@programming.dev
          link
          fedilink
          arrow-up
          3
          arrow-down
          2
          ·
          edit-2
          1 day ago

          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

            • brian@programming.dev
              link
              fedilink
              arrow-up
              2
              ·
              11 hours ago

              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