Skip to content

Instantly share code, notes, and snippets.

@crswll
Created February 27, 2014 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crswll/9259685 to your computer and use it in GitHub Desktop.
Save crswll/9259685 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// ----
@mixin columnize ( $width, $end: 4 ) {
@for $i from 2 through $end {
@media ( min-width: $width * $i ) {
width: 100% / $i;
}
}
}
.foo {
@include columnize( 200px, 6 );
}
@media (min-width: 400px) {
.foo {
width: 50%;
}
}
@media (min-width: 600px) {
.foo {
width: 33.33333%;
}
}
@media (min-width: 800px) {
.foo {
width: 25%;
}
}
@media (min-width: 1000px) {
.foo {
width: 20%;
}
}
@media (min-width: 1200px) {
.foo {
width: 16.66667%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment