3 ms·
What's the difference between custom tailwind classes and... regular CSS?
by candiddevmike 4y ago
What's the difference between custom tailwind classes and... regular CSS?
- gedy 4y agoOr Bootstrap, etc. This is why we didn't end up using TW for a large production app. It's really cool, but realized we were just ending up re-creating something like Bootstrap components using TW @apply.
- verisimilidude 4y agoNot much. Tailwind's @apply just lets you apply Tailwind design tokens to CSS classes. It's useful for keeping designs looking consistent if you're already heavily invested in Tailwind. This is probably not much of an advantage unless you're working at a very large organization with many teams and web properties. And there are other CSS-native ways of enforcing design token consistency without Tailwind too. Open Props is a good example (https://open-props.style/ https://open-props.style/). @apply is also a great lazy way to just slap a string of Tailwind classes from mark-up into a class. It doesn't sound proper but it works in the context of iterative development.
- solumunus 4y agoOnce familiar, it's far quicker to read, write and reason about than raw CSS, in my experience.