Created
August 13, 2018 00:18
-
-
Save lcdsantos/aa39c889a7304de70756ded3af891cad to your computer and use it in GitHub Desktop.
Flexbox alignments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.flex { | |
display: flex; | |
.align-center { | |
margin: auto; | |
align-self: center; | |
} | |
.align-left { | |
margin-right: auto; | |
align-self: center; | |
} | |
.align-right { | |
margin-left: auto; | |
align-self: center; | |
} | |
.align-x-center { | |
margin-right: auto; | |
margin-left: auto; | |
} | |
.align-x-left { | |
margin-right: auto; | |
} | |
.align-x-right { | |
margin-left: auto; | |
} | |
.align-y-center { | |
align-self: center; | |
} | |
.align-y-top { | |
align-self: flex-start; | |
} | |
.align-y-bottom { | |
align-self: flex-end; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment