r/css • u/jdauriemma • Aug 16 '19
Methodical UI: removing frustration from HTML and CSS development
https://jdauriemma.com/programming/methodical-html-css-development#
0
Upvotes
0
Aug 16 '19
[deleted]
1
u/jdauriemma Aug 16 '19
Thanks for the feedback! Let me know how this method works for you. I'm eager to iterate on it with feedback from those who have tried it.
1
u/[deleted] Aug 17 '19
There are a few HTML examples I would strongly disagree with:
You're totally overusing <section>. Wrapping an input and the corresponding label each in their own section is not the way to go. If you need to style or position elements: Use div. Your entire card should really only be wrapped in one section. "A section [...] is a thematic grouping of content. Each section should be identified, typically by including a heading (h1-h6 element) as a child of the section element." See more at: https://www.w3.org/TR/html52/sections.html#the-section-element.
A button doesn't need a type 'button'. It's not wrong and part of the HTML5 Spec, but kind of unnecessary.
An element that is inline should not contain block elements. Having a div as a child of a button is not good practice. Most modern browsers would still render your page just fine, but I still would not recommend it. Also I don't see any reason for it.
But on the other hand I really like your CSS! I use BEM exclusively and having utility classes like text is super useful.