3 ms·
I have a few hundred tailwind classes left in my projects after a purge css pass. If you have thousands you probably should start looking into extracting some c
by cageface 6y ago
I have a few hundred tailwind classes left in my projects after a purge css pass. If you have thousands you probably should start looking into extracting some components. If you literally have "a few thousand" colors in your UI you need to find a new designer.
And CSS variables are great but way more verbose and still require you to come up with "semantic" names for everything.
- nailer 6y ago> If you have thousands you probably should start looking into extracting some components. This is confusing component reuse with design system reuse. Two components may have completely different purposes, but they both have a certain rounding, palette, and other styles.
- cageface 6y ago@apply is your friend here.
- nailer 6y ago100% agreed that sharing styles with @apply is exactly how to solve this. However Tailwind tells users they shouldn't be doing this, encouraging them to paste the same mixins on every element they want them.
- cageface 6y agoThey specifically recommended using it in the documentation to solve exactly the problem you describe.