4 ms·
I'd argue that creating an element that has size dependant on the size of something somewhere completely different is not something you should be doing anyway.
by Conlectus 11y ago
I'd argue that creating an element that has size dependant on the size of something somewhere completely different is not something you should be doing anyway.
As others have mentioned, being able to switch the orientation of the principle axis is very helpful, for example when going from a row to a column on mobile. Because all positioning is defined based on the principle axis, all the styles translate correctly, and you don't have to override 4+ different rules.
> How do I box 1 height stretch? Hm... I don't intuitive know.
If you understand how align-items aligns everything else along the secondary axis, then "align-self: stretch" seems pretty intuitive (http://codepen.io/conlectus/pen/WvGLvy http://codepen.io/conlectus/pen/WvGLvy).
> re: 1em margin breaking alignment
I'm not sure what you're referencing here, as it seems to not do that http://codepen.io/conlectus/pen/WvGLrK http://codepen.io/conlectus/pen/WvGLrK
A guess would be that you don't have box-sizing: border-box on all elements set.
Adding "flex" always makes the element take up as much space as it can, and the number specifies how much "force" it applies compared to other elements.
- lisper 11y agoMinor nit: You mean "principal axis", not "principle axis". Principle is a noun, not an adjective.