Hacker News new | ask | show | jobs
by nailer 1890 days 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.

1 comments

@apply is your friend here.
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.

They specifically recommended using it in the documentation to solve exactly the problem you describe.