Great question. It's pretty rare. However, if you've ever seen a drop-down menu occlude the stuff behind it, you've seen overlapping HTML elements. So, it has its role.
Yes! This is exactly right. Flexbox became important with the
advent of mobile devices and the decline of desktop. (Flexbox and
the even newer grid
layouts.)
Flexbox is important if you might want to switch between narrow, mobile-centric layout for smaller devices and wider layouts for larger devices, like laptops and desktops. We'll learn how to do that next time.
If you just want a standard vertical layout, you might not need the extra machinery of flexbox. But it's good to know.
main { flex: 1 1 auto; }instead of
main { flex: 1 0 auto; }when you only want main to grow and not shrink?"
The flex
property is a shorthand for three specific properties in this order:
flex-grow
sets the growth factorflex-shrink
sets the shrink factorflex-basis
sets the size from which the element grows/shrinksSo, your question is a good one, but I don't see where it says that in the reading. Maybe you misread something?
Sure, I'm happy to talk about this.
Because those are the rules of this particular game. If you think the naming is unintuitive, I won't disagree. But, unfortunately, we don't get to change the naming.
I'm glad!
For sure! Our next assignment will let us practice with both.