Problem Statement
What’s a common way to reuse Tailwind-based styles across multiple components?
Explanation
The @apply directive lets you create custom reusable class definitions by combining Tailwind utilities inside your CSS. It helps reduce duplication.
Code Solution
SolutionRead Only
@layer components { .btn { @apply px-4 py-2 bg-blue-500 text-white rounded; } }Practice Sets
This question appears in the following practice sets:
