Skip to content

Instantly share code, notes, and snippets.

@ataylorme
Forked from irishstu/gist:2718782
Created May 21, 2013 14:26
Show Gist options
  • Save ataylorme/5620185 to your computer and use it in GitHub Desktop.
Save ataylorme/5620185 to your computer and use it in GitHub Desktop.
@mixin boxit ($dir) {
display:box;
display:-moz-box;
display:-webkit-box;
box-orient:$dir;
-moz-box-orient:$dir;
-webkit-box-orient:$dir;
}
@mixin order ($num) {
box-ordinal-group: 1;
-moz-box-ordinal-group: 1;
-webkit-box-ordinal-group: 1;
box-ordinal-group: #{$num};
-moz-box-ordinal-group: #{$num};
-webkit-box-ordinal-group: #{$num};
}
@ataylorme
Copy link
Author

add this to the containing block:

@include boxit(vertical);

and this to each item you want to reorder (changing the number to the order you want it to appear in - here we are swapping headings as an example):

h1 { @include boxnum(2);}
h2 { @include boxnum(1);}

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