Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

What is the concept of "alignment" in CSS as applied to flex items?

$
0
0

According to the Flexbox spec, alignment is what happens after the dimensions of flex items have been finalized.

After a flex container’s contents have finished their flexing and the dimensions of all flex items are finalized, they can then be aligned within the flex container. (https://drafts.csswg.org/css-flexbox/#alignment)

So I was expecting that changing the values of the three alignment properties (justify-content for main axis alignment, align-items/align-self for cross axis alignment) should only result in (translational) movement but should not result in changes to the dimensions (i.e. computed width/height) of any flex items (the dimensions have already been 'finalized', after all).

And my expectation is (I think - correct me if I'm wrong) met in all cases — except the 'stretch' value of align-items/align-self, which does affect the dimensions of the flex items.

Is the spec imprecise on this point, or am I understanding the concept of alignment wrong?


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>