Skip to content

Instantly share code, notes, and snippets.

@kpuputti
Last active December 17, 2015 00:49
Show Gist options
  • Save kpuputti/5524364 to your computer and use it in GitHub Desktop.
Save kpuputti/5524364 to your computer and use it in GitHub Desktop.
@import "compass/css3";
@mixin flexbox-container($orientation: horizontal, $align: stretch, $pack: center) {
@include display-box;
@include box-orient($orientation);
@include box-align($align);
@include box-pack($pack);
}
// Usage:
.container {
@include flexbox-container
.item {
@include box-flex(1);
// Setting the flex item width to 0 prevents the content affecting the
// flex size.
width: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment