|
|
|
|
|
by madeofpalk
1240 days ago
|
|
What part of buttons require javascript? If you want to run javascript when a user clicks a button, yes, that will require javascript. If you want to change the default styling of buttons, you need to write some CSS. This is not 'too hard' - the video points out a single line of CSS that completely removes all default styling. This video invents a bunch of problems, and then just solves them by just... using standard HTML elements. Links for links, buttons for buttons. The author finally ends the video with a pretty terrible recommendation of trying to hide links vs buttons to users by putting them behind the same component. Not only does this approach teach bad habbits, you can very quickly run into a bunch of different corner cases blowing up that logic even further. The one annoying part about buttons could be how they default to type=submit, but with the web's strong focus on backwards compat, the ship sailed on that a while ago, and it's not that onerous to just put type=button on buttons you don't want to submit a form. |
|