Skip to content

Instantly share code, notes, and snippets.

@lukebussey
Created October 14, 2016 14:54
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 lukebussey/8718fce714ea5a31f0613a8999c5974d to your computer and use it in GitHub Desktop.
Save lukebussey/8718fce714ea5a31f0613a8999c5974d to your computer and use it in GitHub Desktop.
/**
* Equal height colums by applying a class of .flex-layout to a row.
*/
.row {
&.flex-layout {
@include flex-layout;
}
}
.row {
&.no-gutter,
&.no-gutters {
@include no-gutters;
}
}
// Vertical Center columns within a row
.row {
&.row-xs-vertical-center {
@media (max-width: $screen-xs-max) {
display: flex;
align-items: center;
}
}
}
// Flex Layout
// Apply to a .row to convert to Flex layout
// May require additional local stying to set specific flexbox settings
@mixin flex-layout {
display: flex;
flex-wrap: wrap;
&:before,
&:after {
display: initial;
}
> [class*='col-'] {
display: flex;
}
}
// No gutters - apply to .row
@mixin no-gutters {
[class*='col-'] {
padding-left: 0;
padding-right: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment