hi there! 👋
-
No, it's not usual and it's not good practice. If you want to center your content using Flexbox, and that's the reason why you want to set
height
on the body usemin-height
instead. If you use height and your content overflows (it can't fit in one screen height) on smaller screens, users won't be able to scroll down.min-height
will still let them to do so. I've never seen anyone setting height on thehtml
tag itself, but maybe I'm missing smg. -
Depends on what's your base style. So where you start. If you build your site using mobile-first workflow, then you should use
min-width
, otherwise at desktop-first you should usemax-width
.
Hope this was helpful 🙏
Good luck and happy coding! 💪