Re:Building React and Vue Support for Tailwind UI
by nailer on Tuesday April 13, 2021 @10:39AM
(#26792756)
> 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.
Re:Building React and Vue Support for Tailwind UI
by cageface on Tuesday April 13, 2021 @10:54AM
(#26793005)
@apply is your friend here.
Re:Building React and Vue Support for Tailwind UI
by nailer on Tuesday April 13, 2021 @01:14PM
(#26795617)
100% 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.
And CSS variables are great but way more verbose and still require you to come up with "semantic" names for everything.