This library highlights the biggest issue of tailwind for me.
> Clean HTML
The rest of your code will still use bunch of shitty tailwind shortcuts that are really chaotic the moment you build something more than a simplest component.
> Clean HTML
The rest of your code will still use bunch of shitty tailwind shortcuts that are really chaotic the moment you build something more than a simplest component.
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.button {
@apply text-2xl p-2 bg-gray-100 text-gray-600 border border-gray-200 cursor-pointer hover:bg-gray-200 hover:border-gray-300;
}
}
I can now just give all of my reusable buttons the ".button" class instead of the giant string above. I can even add more styles or overwrite existing styles to give it a different look such as: <button class="button bg-red-100 text-red-600">Click Me</button>