Skip to content

Instantly share code, notes, and snippets.

@morganfeeney
Created December 7, 2015 16:56
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 morganfeeney/78ee705d79ae6b385270 to your computer and use it in GitHub Desktop.
Save morganfeeney/78ee705d79ae6b385270 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$brandbg: #FF7070;
$lightbg: #FFF;
$brandbg--light: #FFD4D4;
$darkbg: #555;
$u: rem;
$horz-spacing: 1;
$vert-spacing: 1.75rem;
$grid-gutter: $horz-spacing+$u;
$m: $horz-spacing;
$cols: 12;
@for $i from 0 through $cols {
.col-#{$i} {
// Column width
$col: percentage($i/$cols); // OK
// 33%
//$col2: percentage($cols/$i); // OK
$col-rev: 100%/$cols*($cols)-$col;
//$col3: $col-rev*100%/$col;
// Gutter width
$gutter-count: $i + 1;
$f1: (($gutter-count)-1)/($gutter-count)*$m;
//$f2: ($i)/(($i)-1/2)+$u;
//$f3: (($f1)/1);
//$f4: $f1/2;
// #1
flex: 0 0 calc(#{$col-rev} - #{$f1+$u});
// flex: 0 0 calc(#{$col-rev});
//flex: 0 0 calc(#{$col-rev} - #{$f1+$u};
//flex: 0 0 calc(#{$col3} - #{$f1+$u};
// #2
//flex: 0 0 calc(#{$col} - #{$f2};
// #3
//flex: 0 0 calc(#{$col} - #{$f3+$u};
// #4
//flex: 0 0 calc(#{$col} - #{$f4+$u};
// #1
//flex: 0 0 calc(#{$col2} - #{$f1+$u};
}
}
.col-0 {
flex: 0 0 calc(100% - 0rem);
}
.col-1 {
flex: 0 0 calc(91.66667% - 0.5rem);
}
.col-2 {
flex: 0 0 calc(83.33333% - 0.66667rem);
}
.col-3 {
flex: 0 0 calc(75% - 0.75rem);
}
.col-4 {
flex: 0 0 calc(66.66667% - 0.8rem);
}
.col-5 {
flex: 0 0 calc(58.33333% - 0.83333rem);
}
.col-6 {
flex: 0 0 calc(50% - 0.85714rem);
}
.col-7 {
flex: 0 0 calc(41.66667% - 0.875rem);
}
.col-8 {
flex: 0 0 calc(33.33333% - 0.88889rem);
}
.col-9 {
flex: 0 0 calc(25% - 0.9rem);
}
.col-10 {
flex: 0 0 calc(16.66667% - 0.90909rem);
}
.col-11 {
flex: 0 0 calc(8.33333% - 0.91667rem);
}
.col-12 {
flex: 0 0 calc(0% - 0.92308rem);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment