andybrewer / mvp

MVP.css — Minimalist classless CSS stylesheet for HTML elements
https://andybrewer.github.io/mvp/
MIT License
4.98k stars 192 forks source link

Style <input type="submit"> as a button #85

Closed MatthiasPortzel closed 2 years ago

MatthiasPortzel commented 2 years ago

Django generate forms with submit buttons represented as <input type="submit" value="submit">. It's my understanding that this is the semantic way to represent the submit button for a form, so I expected mvp.css to style these like a <button>.

ChristopherBilg commented 2 years ago

<input type="submit" value="submit"> is the semantic method of expressing a button that is used to submit a web form. the button HTML tag is used for "... interactive element[s] activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology." per the MDN Web Docs. These are two independent use cases and shouldn't overlap in terms of CSS, in my opinion.

andybrewer commented 2 years ago

@MatthiasPortzel I think it makes sense and is an easy enough implementation, so I've added it here: https://github.com/andybrewer/mvp/releases/tag/v1.12

@ChristopherBilg It looks like regarding functionality, they're interchangeable: https://stackoverflow.com/questions/7117639/input-type-submit-vs-button-tag-are-they-interchangeable

ChristopherBilg commented 2 years ago

Thanks for the update @andybrewer ! Sounds good!

MatthiasPortzel commented 2 years ago

Finally got back around to this. Looks great @andybrewer, thanks.