Skip to content

Instantly share code, notes, and snippets.

@jpillora
Created September 17, 2014 07:56
Show Gist options
  • Save jpillora/7408e4e9dfc6c65f58c8 to your computer and use it in GitHub Desktop.
Save jpillora/7408e4e9dfc6c65f58c8 to your computer and use it in GitHub Desktop.
Nib (Stylus) Flex Example
.flex
display(flex)
flex-direction(normal)
flex-direction(row)
flex-wrap(wrap)
justify-content(start)
align-content(stretch)
.item
order(0)
flex(0 1 auto)
align-self(auto)
/*
becomes...
.flex {
display: -webkit-box;
display: -moz-box;
display: -webkit-flex;
display: -ms-flexbox;
display: box;
display: flex;
-webkit-flex-direction: normal;
-ms-flex-direction: normal;
flex-direction: normal;
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
-o-box-orient: horizontal;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-lines: multiple;
-moz-box-lines: multiple;
-o-box-lines: multiple;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-pack: start;
-moz-box-pack: start;
-o-box-pack: start;
-ms-flex-pack: start;
-webkit-justify-content: start;
justify-content: start;
-ms-flex-line-pack: stretch;
-webkit-align-content: stretch;
align-content: stretch;
}
.flex .item {
-webkit-box-ordinal-group: 0;
-moz-box-ordinal-group: 0;
-o-box-ordinal-group: 0;
-ms-flex-order: 0;
-webkit-order: 0;
order: 0;
-webkit-box-flex: 1;
-moz-box-flex: 1;
-o-box-flex: 1;
box-flex: 1;
-webkit-flex: 0 1 auto;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
-webkit-align-self: auto;
align-self: auto;
-ms-flex-item-align: auto;
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment