Hacker News new | ask | show | jobs
by xigoi 324 days ago
> But if you make a .button class, now people are going to be tempted to use that to style their own buttons.

How is having consistent design across the entire application a bad thing?

1 comments

There has never been an application where I worked that anyone is happy with the base design of the button. There is always some variant, some edge case, some requirement that doesn't fit. This is the whole reason why BEM became a thing briefly and it was tedious. Tailwind solves all that. Just have a base set of styles, pass in any additional styles to the component based on the specific requirements and where the component is used, use tailwind-merge in the component and now I never have to care ever again.
I agree, same boat. You always end up with dozens of button styles and most devs treat CSS as read-only.

Changing the .button class is risky, you'll break the entire application. So you just create a new class. Um, oops.