Skip to content

Instantly share code, notes, and snippets.

@luxiaojian
Created March 22, 2015 11:09
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 luxiaojian/3c786ecbed9a44b4a2d7 to your computer and use it in GitHub Desktop.
Save luxiaojian/3c786ecbed9a44b4a2d7 to your computer and use it in GitHub Desktop.
flexbox sass @mixin
@mixin flexbox() {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
@mixin flex($values) {
-webkit-box-flex: $values;
-moz-box-flex: $values;
-webkit-flex: $values;
-ms-flex: $values;
flex: $values;
}
@mixin order($val) {
-webkit-box-ordinal-group: $val;
-moz-box-ordinal-group: $val;
-ms-flex-order: $val;
-webkit-order: $val;
order: $val;
}
.wrapper {
@include flexbox();
}
.item {
@include flex(1 200px);
@include order(2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment