logoalt Hacker News

SebastianKratoday at 10:25 AM1 replyview on HN

Are you suggesting to style the tag name directly? Because that would create chaos in a codebase. <button> is for semantics. It's possible that other design system components need the same semantic element.


Replies

afavourtoday at 10:40 AM

No, I’m suggesting that .button.something-else wouldn’t make any sense. You’d just do button.something-else… not that it would really be that useful to do so.

And as you say, it’s for semantics so I wouldn’t use .button anyway as it doesn’t carry the right specificity for styling.