Created
March 7, 2015 17:40
-
-
Save hilja/f1ed97e557370765a0be to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
- (1..12).each do |i| | |
%div{:class => "item-"#{i}} |
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
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
// 12 column grid | |
$cols: 12; | |
// Column widths as percentages | |
$col-width: percentage(1 / $cols); | |
@for $i from 1 through $cols { | |
.col-#{$cols} { | |
width: $col-width * $i; | |
} | |
// Iterate the counter | |
$cols: $cols - 1; | |
} |
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
.col-12 { | |
width: 8.33333%; | |
} | |
.col-11 { | |
width: 16.66667%; | |
} | |
.col-10 { | |
width: 25.0%; | |
} | |
.col-9 { | |
width: 33.33333%; | |
} | |
.col-8 { | |
width: 41.66667%; | |
} | |
.col-7 { | |
width: 50.0%; | |
} | |
.col-6 { | |
width: 58.33333%; | |
} | |
.col-5 { | |
width: 66.66667%; | |
} | |
.col-4 { | |
width: 75.0%; | |
} | |
.col-3 { | |
width: 83.33333%; | |
} | |
.col-2 { | |
width: 91.66667%; | |
} | |
.col-1 { | |
width: 100.0%; | |
} |
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
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> | |
<!-- /.col-=i --> | |
<div class='item'></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment