Created
July 20, 2016 14:35
-
-
Save ste2425/42d07755ec6febc843b037ce47bfe7f9 to your computer and use it in GitHub Desktop.
response grid layout
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
/* | |
Variables: | |
$screen-size-small | |
$screen-size-medium | |
$screen-size-large | |
$grid-small-screen-width | |
$grid-medium-screen-width | |
$grid-large-screen-width | |
$grid-column-count | |
*/ | |
.grid-row { | |
&:before, | |
&:after { | |
visibility: hidden; | |
display: block; | |
content: ""; | |
height: 0; | |
clear: both; | |
} | |
&.margin { | |
margin-bottom: 10px; | |
} | |
@media (mix-width: $screen-size-small) { | |
width: $grid-small-screen-width; | |
} | |
@media (mix-width: $screen-size-medium) { | |
width: $grid-medium-screen-width; | |
} | |
@media (mix-width: $screen-size-large) { | |
width: $grid-large-screen-width; | |
} | |
} | |
@mixin make-columns($columnCount) { | |
@if (round($columnCount) !=$columnCount) { | |
@error "Grid system can only use integer column count. It will not round."; | |
} | |
@for $i from 1 through $columnCount { | |
.grid-span-#{$i} { | |
width: percentage($i / $columnCount); | |
float: left; | |
box-sizing: border-box; | |
} | |
} | |
} | |
@include make-columns($grid-column-count); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hahahahahaha yes