A UI component library telling you not to reinvent the wheel by reinventing the wheel.
@matuzo the only good conventions and frameworks to rely on are your own. The tech graveyard is fillled with no-longer-supported projects that dictate how things are constructed, and I don’t understand how or why people find the time for such “good ideas”
@matuzo It's objectively very funny to reinvent Bootstrap *on top* of Tailwind. Unfortunately <a class="btn"> is considered bad practice even in Bootstrap.
@matuzo Wow… I wonder how many more layers on top of CSS they come up with before they realize vanilla CSS may in fact be alright to begin with 🙃
@matuzo If you wanted to style a link like a button, say a "View" link that takes you elsewhere, this could be a decent approach, no? Whereas actual buttons (the kind that trigger an action _on the page_, or submit a form) might not need these classes (or maybe in your app they do, to keep things consistent). Like "View," "Edit," "Delete" "buttons" that you may want to style similarly (and where Edit and Delete trigger a POST/PATCH/PUT/DELETE request rather than a GET request)?
@matuzo (In the same vein, I often have, e.g., "Mark as Read" "links" that are in fact buttons triggering a POST request. [Because GET requests shouldn't change state, yadda yadda.])
@matuzo (Although visually styling links as buttons and vice versa may not be very accessible at all. I don't know. It's done often, I think. Or maybe folks just use `a` elements, or worse, `span`s, everywhere. That would be plain wrong.)
@janboddez That's what I do, my understanding is that it's correct. It's more important to keep the meaning of buttons-as-action for screen readers, even if they are styled without a background/border or padding.
@janboddez the link in the example has no href which means that's is a "placeholder link". That's an inaccessible anti pattern often used instead of the more accessible <button>.
@matuzo Thanx for the explanation.
I had the same question as @janboddez, as there's nothing wrong with visually styling links like some kind of buttons ("call to action" links) but I didn't notice there was no href. This is a major failure.
@matuzo “focus on important things”… like what? npm install *? 😅
@matuzo in this case the wheel is Bootstrap. 😂
@matuzo imagine if those framework folks invested the same energy in learning HTML, CSS, and JavaScript... they might even make something useful!
@matuzo At least it's not a div.