Align content
←Use the Flexbox content alignment helper class to position ALL childs on the main axis. Note, this has no effect when the flexbox has only a single line. It needs to wrap over multiple lines. This will set the CSS property align-content
, see the MDN page.
This one of the puzzling Flexbox features. Only when those boxes create two lines, the property will apply.
Syntax:
.content-{alignment}
SCSS:
_flex-align-content.scss
.content-end
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
↑ Items are placed on the end.
.content-center
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
↑ Items are placed in the middle.
.content-between
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
↑ Items are placed in between, starting at start, ending at end.
.content-around
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
.box.auto
↑ Items are played around with some space left on start and end.