30 ms·
I mean, you can just remove all the user agent styles and then <button> is just as stylable as <div>.
by jazzypants 1y ago
I mean, you can just remove all the user agent styles and then <button> is just as stylable as <div>.
- macintux 1y agoWhy would marketing want to pay for the extra (and to their mind entirely pointless) work required to capture semantics? (I’m not saying I like the world we live in, but I don’t see a likely alternative.)
- withinboredom 1y agoBecause not everyone has useful eyeballs. Some people are blind. The amount of extra work you have to do to make a div faithfully act like a button is far more than simply resetting some styles.
- macintux 1y agoIt seems evident to me that semantics are more challenging to define than visuals; it's not the CSS that's the problem.
- lwhi 1y agoIt's more challenging to encourage correct implementation of semantics than implemention of visuals; which is a great reason for using the element that was designed for this use case.
- mpeg 1y agoI've literally never had a marketing person tell me whether I should use a <button> or <div>. Let's not pretend things like using the wrong semantic elements is anyone else's fault but lazy or inexperienced developers. These days it's a moot point anyway, because everyone is using things like tailwind which provide a full reset for things like default buttons, so there really is no excuse.