> bg-sky-500 hover:bg-sky-600 active:bg-sky-700 text-white px-4 py-2 rounded-lg What fresh fucking hell is this? I can't say I've had the (mis)fortune of being forced to work with Tailwind (I've seen the name enough to know it's something vaguely "CSS framework"-adjacent though). Seriously, though what kind of crack induced nightmare state was required for someone to think up such an abomination, implement it, and th…
This element has a small amount of x and y padding that is suitable for (for example) keeping text away from the edge of the container. The text is white. The corners of this are rounded.
The background is the default intensity 'sky' colour, which darkens slightly on hover and darkens further when it's active.
You can take this from 77 characters to 189 like this:
.button {
background-color: #0ea5e9;
color: white;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
}
.button:hover {
background-color: #0284c7;
}
.button:active {
background-color: #0369a1;
}
Tailwind simplifies consistency, and frankly is pretty readable. It's not like Button is exactly the pinnacle of human clarity and simplicity in the first place.Of course there are other ways to do it, but this faux outrage demonstrates not that this is some 'fresh fucking hell' or some 'crack induced nightmare', but rather that you simply don't get it.