Compose Tailwind Utilities with @apply
lessonDuration 9m 35s
The @apply directive lets you compose utility classes so you can re-use common styles and not litter your html with a ton of repetitive styles. Even when using @apply directives, it's still easy to start repeating yourself in your code. We'll use the multi-class component pattern to extract the common styles into a base class and then styling (e.g. color) can be additionally applied as another class.