Created
September 23, 2014 08:10
-
-
Save DarbyBrown/75dead50acbb0e7d6b59 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin create-grids($cols: 12, $bps: (sm 480px, md 640px, lg 860px)) { | |
.col { | |
width: 100%; | |
} | |
@each $bp in $bps { | |
$bp-name: nth($bp, 1); | |
$bp-value: nth($bp, 2); | |
@media all and (min-width: $bp-value) { | |
@for $i from 1 through $cols { | |
.col-#{$bp-name}-#{$i} { | |
width: (100% / $cols) * $i; | |
} | |
} | |
} | |
} | |
} | |
@include create-grids(); |
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
.col { | |
width: 100%; | |
} | |
@media all and (min-width: 480px) { | |
.col-sm-1 { | |
width: 8.33333%; | |
} | |
.col-sm-2 { | |
width: 16.66667%; | |
} | |
.col-sm-3 { | |
width: 25%; | |
} | |
.col-sm-4 { | |
width: 33.33333%; | |
} | |
.col-sm-5 { | |
width: 41.66667%; | |
} | |
.col-sm-6 { | |
width: 50%; | |
} | |
.col-sm-7 { | |
width: 58.33333%; | |
} | |
.col-sm-8 { | |
width: 66.66667%; | |
} | |
.col-sm-9 { | |
width: 75%; | |
} | |
.col-sm-10 { | |
width: 83.33333%; | |
} | |
.col-sm-11 { | |
width: 91.66667%; | |
} | |
.col-sm-12 { | |
width: 100%; | |
} | |
} | |
@media all and (min-width: 640px) { | |
.col-md-1 { | |
width: 8.33333%; | |
} | |
.col-md-2 { | |
width: 16.66667%; | |
} | |
.col-md-3 { | |
width: 25%; | |
} | |
.col-md-4 { | |
width: 33.33333%; | |
} | |
.col-md-5 { | |
width: 41.66667%; | |
} | |
.col-md-6 { | |
width: 50%; | |
} | |
.col-md-7 { | |
width: 58.33333%; | |
} | |
.col-md-8 { | |
width: 66.66667%; | |
} | |
.col-md-9 { | |
width: 75%; | |
} | |
.col-md-10 { | |
width: 83.33333%; | |
} | |
.col-md-11 { | |
width: 91.66667%; | |
} | |
.col-md-12 { | |
width: 100%; | |
} | |
} | |
@media all and (min-width: 860px) { | |
.col-lg-1 { | |
width: 8.33333%; | |
} | |
.col-lg-2 { | |
width: 16.66667%; | |
} | |
.col-lg-3 { | |
width: 25%; | |
} | |
.col-lg-4 { | |
width: 33.33333%; | |
} | |
.col-lg-5 { | |
width: 41.66667%; | |
} | |
.col-lg-6 { | |
width: 50%; | |
} | |
.col-lg-7 { | |
width: 58.33333%; | |
} | |
.col-lg-8 { | |
width: 66.66667%; | |
} | |
.col-lg-9 { | |
width: 75%; | |
} | |
.col-lg-10 { | |
width: 83.33333%; | |
} | |
.col-lg-11 { | |
width: 91.66667%; | |
} | |
.col-lg-12 { | |
width: 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment