4 ms·
Which is no different from creating a styles.css file, writing your classes there, and importing it into your html...
by kykeonaut 3y ago
Which is no different from creating a styles.css file, writing your classes there, and importing it into your html...
- seanwilson 3y agoTailwind is more like you create lot of (utility) classes in your styles.css file that tweak just one styling property like a font, a color or a margin, and then reuse those classes to style each of your UI components like buttons and headers. With traditional CSS, you would assign a class to each UI component and then write custom CSS for each one. Usually people try to share CSS between classes but then you have to be really careful you don't break unrelated components as you make changes later. Read the Tailwind links above to understand more about the pros/cons of each approach.
- kykeonaut 3y agoI do think that the real value of Tailwind comes from the utility classes, rather than css-in-html paradigm. You could achieve the same, for example, with Pollen.css [0] or Open Props [1]. [0] https://github.com/heybokeh/pollen https://github.com/heybokeh/pollen [1] https://github.com/argyleink/open-props https://github.com/argyleink/open-props
- seanwilson 3y agoThis covers the design token part but it's very verbose (especially when you need responsive behaviour) when you want to iterate on styling a component compared to Tailwind and doesn't cover the other problems with CSS mentioned in https://tailwindcss.com/docs/utility-first https://tailwindcss.com/docs/utility-first. I guess it depends how complex your designs are?