Created
October 14, 2016 14:54
-
-
Save lukebussey/8718fce714ea5a31f0613a8999c5974d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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