Last active
September 24, 2016 22:30
-
-
Save matallo/2d9ac23c713b3434f9921d447e33172e 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
// Grids | |
// -------------------------------------------------- | |
$grid-columns: 12; | |
.Grid { | |
display: flex; | |
} | |
.Grid-inner { | |
display: flex; | |
flex-wrap: wrap; | |
flex: 1; | |
max-width: calc(100% + 40px); | |
margin-right: -20px; | |
margin-left: -20px; | |
} | |
.Grid-inner--hCenter { | |
justify-content: center; | |
} | |
.Grid-inner--vCenter { | |
align-items: center; | |
} | |
.Grid-cell { | |
padding-right: 20px; | |
padding-left: 20px; | |
} | |
.Grid-inner--noPadding { | |
max-width: 100%; | |
margin-right: 0; | |
margin-left: 0; | |
> .Grid-cell { | |
padding-left: 0; | |
padding-right: 0; | |
} | |
} | |
@mixin col($i, $n) { | |
flex: 0 0 $i * 100 / $n * 1%; | |
max-width: $i * 100 / $n * 1%; | |
} | |
@for $i from 1 through 12 { | |
.Grid-cell--col#{$i} { | |
@include col($i, 12); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment