Align margin
←With the auto margin helper classes you can align items in a Flexbox on the main axis.
Someday, there will be a justify-self
property in Flexbox to make this a little more semantic and less hacky. Don’t get confused by the other alignment methods here.
Syntax:
.ma{-direction?}-auto
SCSS:
_margin-auto.scss
Flexbox row
ma-h-auto
no extra class
ma-l-auto
↑ Useful for horizontal navigations.
Flexbox column
ma-v-auto
no extra class
ma-t-auto