Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gavinkilbride/bc504640b4289ad73dc763f338fb1e9c to your computer and use it in GitHub Desktop.
Save gavinkilbride/bc504640b4289ad73dc763f338fb1e9c to your computer and use it in GitHub Desktop.
Flexbox Cheatsheet
# Choose the main axis:
flexDirection: 'column' || 'row'
# Align the main axis:
justifyContent: 'flex-start' || 'flex-end' || 'center' || 'space-around' || 'space-between'
# Align the cross axis:
alignItems: 'flex-start' || 'flex-end' || 'center' || 'stretch'
# Align individual elements:
alignSelf: 'flex-start' || 'flex-end' || 'center' || 'stretch' || 'auto'
# Give it a wrap:
flexWrap: 'wrap' || 'nowrap'
# Define relative fluidity of an element:
flex: number (e.g. 1, 1/2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment