3 ms·
Not 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
by nojvek 8y ago
Not 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