4 ms·
Not a CSS guru but I'm pretty sure that's because display: block (the original document layout strategy?) grows vertically, so it doesn't really make sense to h
by bavell 3y ago
Not a CSS guru but I'm pretty sure that's because display: block (the original document layout strategy?) grows vertically, so it doesn't really make sense to have an auto value for top/bottom. And I believe margin:auto only applies when there is a width constraint in the element.
- paulddraper 3y agoThere are Reasons(TM) for it. And yet when flexbox was created, there was no horizonal/vertical difference.
- bavell 3y agoI'm not sure about that, flexbox has a major and minor axis, which you can define with flex-direction.
- paulddraper 3y agoAs I said, there is no inconsistent treatment of horizontal and vertical.