|
|
|
|
|
by mintone
2044 days ago
|
|
If you're not using components (react/vue etc.) then you can use @apply - I think the secret with that is to blend inline tailwind and the applied style so you might say.. .button {
@apply rounded-md bg-gray-600 hover:bg-gray-300 text-white;
}
and then inline you might use class="button px-2 py-4" or similar to create specific styles. Of course these could be abstracted again to .big-button .small-button etc. Tailwind has changed not only how I write CSS but how I think about writing front-end code completely - it's really great once it clicks. |
|