Skip to content

Instantly share code, notes, and snippets.

@CannonballSkippy
Created June 5, 2017 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CannonballSkippy/2adce6491fa8565fff4c75e0a47a2711 to your computer and use it in GitHub Desktop.
Save CannonballSkippy/2adce6491fa8565fff4c75e0a47a2711 to your computer and use it in GitHub Desktop.
A brief and short CSS flexbox reference
/*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;
}
@CannonballSkippy
Copy link
Author

flex-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment