5 ms·
I'm curious, if you're using CSS-in-JS already why not jump to tailwind? Its slightly more restrictive, but I've found the more opinionated style incredibly hel
by tevon 4y ago
I'm curious, if you're using CSS-in-JS already why not jump to tailwind? Its slightly more restrictive, but I've found the more opinionated style incredibly helpful.
What are the benefits you're getting from CSS-in-JS?
- theturtletalks 4y agoI use Mantine[0] which uses Emotion[1] for styling. I like keeping the CSS properties in a neat JSON object instead of a long string like Tailwind does. With the object approach, conditional styling is easier too. With Tailwind, you have to use cx or another package to do this and it makes the code a little hard to read. Emotion isn't without it's flaws though. The company that created Emotion doesn't use it anymore because of runtime overhead[2] so Tailwind may be the future after all. [0] https://mantine.dev https://mantine.dev [1] https://emotion.sh/docs/introduction https://emotion.sh/docs/introduction [2] https://www.infoq.com/news/2022/10/prefer-build-time-css-js/?itm_campaign=rightbar_v2&itm_source=infoq&itm_medium=news_link&itm_content=link_text https://www.infoq.com/news/2022/10/prefer-build-time-css-js/...
- satvikpendem 4y agoVanilla-Extract is CSS-in-TS that compiles to raw CSS. https://vanilla-extract.style https://vanilla-extract.style