4 ms·
Tailwind and CSS-in-JS are not mutually exclusive! On the contrary, they're a terrific match!
by chrisweekly 8y ago
Tailwind and CSS-in-JS are not mutually exclusive! On the contrary, they're a terrific match!
- nojvek 8y agoNot really CSS in js is basically applying styles directly to an element, this one declares a small style sheet upfront and classes on elements are looked up to get style information. Css in js is very efficient if you don’t need any css inheritance. Tailwind is just inefficient for the browser to do all those lookups to resolve the final style bag. I’m not sure why I would ever use tailwind. It’s yet another archaic syntax I have to keep in my head.
- chrisweekly 8y agoSorry, but, respectfully, you misunderstand tailwind in the context of css-in-js. This post might make a better case than I have time to right now: https://github.com/jlengstorf/gatsby-tailwind-demo https://github.com/jlengstorf/gatsby-tailwind-demo
- armandososa 8y agoHmm. That's an interesting syntax. I still don't like it and would hate to work on a codebase that used that for styling but I'm happy to know that it exists as an option for people who like tailwind!!