@ryan.murray
To use @apply from Tailwind CSS in plain CSS, you can create a custom CSS class that applies the Tailwind utility classes using @apply. Here's an example:
1 2 3 |
.custom-class { @apply bg-blue-500 text-white p-4 rounded-md; } |
1 2 3 |
<div class="custom-class"> This is a styled div </div> |
When you apply the custom class to an element, it will automatically apply all the utility classes specified in the @apply directive. Note that this method may not work in all cases, as @apply is a PostCSS feature and may not be fully supported in all browsers.