Created
November 23, 2019 10:27
-
-
Save kelvinndmo/ceda95fd094265b5836d64e51f31e3e6 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
.row{ | |
max-width: $grid-width; | |
background-color: red; | |
margin: 0 auto; | |
&:not(:last-child){ | |
margin-bottom: $gutter-vertical; | |
} | |
@include clearfix; | |
[class^="col-"]{ | |
background-color: wheat; | |
&:not(:last-child){ | |
margin-right: $horizontal-gutter; | |
} | |
float: left; | |
} | |
.col-1-of-2{ | |
width: calc((100% - #{$horizontal-gutter}) / 2); | |
} | |
.col-1-of-3{ | |
width: calc((100% - 2 * (#{$horizontal-gutter})) / 3); | |
} | |
.col-1-of-4{ | |
width: calc((100% - 3 * (#{$horizontal-gutter})) / 4); | |
} | |
.col-2-of-3{ | |
width: calc(2 * ((100% - 2 * (#{$horizontal-gutter})) / 3) + #{$horizontal-gutter}); | |
} | |
.col-2-of-4{ | |
width: calc(2 * ((100% - 3 * (#{$horizontal-gutter})) / 4) + #{$horizontal-gutter}); | |
} | |
.col-3-of-4{ | |
width: calc(3 * ((100% - 3 * (#{$horizontal-gutter})) / 4) + 2 * #{$horizontal-gutter}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment