Last active
March 14, 2019 19:32
-
-
Save adam-weber/6f82fbd9894f5e601881c21414986484 to your computer and use it in GitHub Desktop.
12 Column CSS Grid in 10 lines
This file contains 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 { | |
display: -ms-flex; | |
display: -webkit-flex; | |
display: flex; | |
} | |
@for $i from 1 through 12 { | |
.row > div.column-#{$i} { | |
width: ($i/12)*100%; | |
} | |
} |
This file contains 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
<div class="row"> | |
<div class="column-6"> | |
I take up half the page horizontally. | |
</div> | |
<div class="column-6"> | |
I also take up half of the page. | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment