Skip to content

Instantly share code, notes, and snippets.

@srsgores
Created November 7, 2014 07:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srsgores/82efce2208cc3b6c1e57 to your computer and use it in GitHub Desktop.
Save srsgores/82efce2208cc3b6c1e57 to your computer and use it in GitHub Desktop.
Helpers for flexbox
flex()
-webkit-box-flex arguments[0]
-webkit-flex arguments
-moz-box-flex arguments[0]
-ms-flex arguments
flex arguments
$display-flex
display -webkit-box
display -webkit-flex
display -moz-box
display -ms-flexbox
display flex
flex-direction(direction=normal)
if direction is column
-webkit-box-orient vertical
-webkit-box-direction normal
-webkit-flex-direction column
-moz-box-orient vertical
-moz-box-direction normal
-ms-flex-direction column
flex-direction column
align-items(direction)
$legacyDirection = unquote("flex-" + $direction)
-webkit-box-align direction
-webkit-align-items $legacyDirection
-moz-box-align direction
-ms-flex-align direction
align-items $legacyDirection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment