Created
June 5, 2017 10:35
-
-
Save CannonballSkippy/2adce6491fa8565fff4c75e0a47a2711 to your computer and use it in GitHub Desktop.
A brief and short CSS flexbox reference
This file contains 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
/*The first values are the defaults*/ | |
.parent { | |
display: flex | inline-flex; | |
flex-direction: row | row-reverse | column | column-reverse; | |
flex-wrap: nowrap | wrap | wrap-reverse; | |
justify-content: flex-start | flex-end | center | space-between | space-around; | |
align-items: stretch | flex-end | center | baseline | flex-start; | |
align-content: stretch | flex-end | center | space-between | space-around | flex-start; | |
} | |
.child { | |
order: <integer>; | |
flex-grow: <number>; /* default 0 */ | |
flex-shrink: <number>; /* default 1 */ | |
flex-basis: <length> | auto; /* default auto */ | |
align-self: auto | flex-start | flex-end | center | baseline | stretch; /* default auto */ | |
} | |
/*SHORTHANDS*/ | |
.parent { | |
flex-flow: flex-direction and flex-wrap; | |
} | |
.child { | |
flex: flex-grow, flex-shrink and flex-basis; | |
} |
Author
CannonballSkippy
commented
Jun 5, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment