DEV Community

Discussion on: Breaking the law with <fieldset>

patricknelson profile image
Patrick Nelson • Edited on

I'm coming here from totally out of the blue... so I might be missing some context here. πŸ˜…

But this question is about M- itself (since I couldn't quite figure out it immediately looking at the landing page, so I might be bit thick): The HTML at the M- forms page you linked to looks pretty standard. That is, it may feel a bit verbose, but to me it's pretty clean. Is it because M- is itself a bootstrap like library which styles (and maybe adds functionality to) the elements for you and also provides a way to easily create custom elements? πŸ€”

EDIT: Never mind; homepage says "UI Library." My embarrassing comment stays.

jfbrennan profile image
Jordan Brennan Author

M- is like Bootstrap in the sense that it’s a ready-to-use collection of UI components and utility classes.

The purpose of this article is to just highlight how M- simply uses fieldset in a somewhat unconventional way rather than adding bloat like Bootstrap or similar. They require a div plus β€œinput” classes, whereas M- just says fieldset all the things! I think it makes for much cleaner form code and avoids the extraneous input classes.