The upcoming (and awesome) gifs were graciously borrowed from this insightful blog post that covers flexbox
Defines a flex container
inline or block depending on the given value
.container {
display: flex; /* or inline-flex */
}
Establishes the main-axis and defines the direction flex items are placed in the flex container
Determines whether the flex items are layed out as either horizontal rows or vertical columns
.container {
flex-direction: row | row-reverse | column | column-reverse;
}
By default, flex items will all try to fit onto one line
.container {
flex-wrap: nowrap | wrap | wrap-reverse;
}
flex-direction
and flex-wrap
properties at the same time
flex-flow: <‘flex-direction’> || <‘flex-wrap’>
//specifies flow-direction: row & flex-wrap: wrap
flex-flow: row wrap
defines the alignment along the main axis
will distribute extra free space left after all the flex items have reached their maximum size
.container {
justify-content: flex-start | flex-end | center | space-between | space-around;
}
aligns a flex container’s lines within when there is extra space in the cross-axis
align-content only applies when there are mutiple lines of flex items
.container {
align-content: flex-start | flex-end | center | space-between | space-around | stretch;
}