Skip to content

Instantly share code, notes, and snippets.

@borkxs
Last active November 15, 2017 00:17
Show Gist options
  • Save borkxs/0f726ccb7ffe1011306a to your computer and use it in GitHub Desktop.
Save borkxs/0f726ccb7ffe1011306a to your computer and use it in GitHub Desktop.
flexbox cheatsheet
.flex-box {
display: flex;
flex-direction: row; /* row-reverse, column, column-reverse */
flex-wrap: nowrap; /* wrap, wrap-reverse */
flex-flow: row nowrap; /* [flex-wrap] [flex-direction] */
justify-content: flex-start; /* flex-end, center, space-between, space-around */
align-items: stretch; /* flex-start, flex-end, center, baseline */
.flex-child {
flex-grow: 1; /* 4, 0.2 */ /* no negatives allowed */
flex-shrink: 1; /* 4, 0.2 */ /* no negatives allowed */
flex-basis: auto; /* width, fill, max-content, min-content, fit-content, content */
flex: 1 1 auto; /* [flex-grow] [flex-shrink] [flex-basis]; */
align-self: auto; /* flex-start, flex-end, center, baseline, stretch */
order: 0; /* positive or negative integer */
}
}
@borkxs
Copy link
Author

borkxs commented Jan 31, 2017

screen shot 2017-01-31 at 10 42 41 am

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