-
Notifications
You must be signed in to change notification settings - Fork 26
/
flexgrid-ie.sass
43 lines (34 loc) · 982 Bytes
/
flexgrid-ie.sass
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**! ptb2.me/flexgrid | (c) 2014 Peter T Bosse II | Apache license
/**! Inspired by Bootstrap 3.2 | License: http://bit.ly/WzvaP8
$fixed-grid-width: 750px !default
$grid-gutter-width: 30px !default
$grid-columns: 12 !default
// Rename these classes if you don't need Bootstrap compatibility
$container: 'container' !default
$row: 'row' !default
$span: 'col-sm-' !default
$offset: 'col-sm-offset-' !default
=fixed-grid-widths($num-columns)
$i: 1
@while $i <= $num-columns
.#{$span}#{$i}
*width: ((($fixed-grid-width / $num-columns) * $i) - $grid-gutter-width)
@if $i < $num-columns
.#{$offset}#{$i}
*margin-left: (($fixed-grid-width / $num-columns) * $i)
$i: $i + 1
=span-x($num-columns)
$i: 1
@while $i <= $num-columns
.#{$span}#{$i}
@extend %span
$i: $i + 1
.#{$container}
*width: $fixed-grid-width
.#{$row}
*zoom: 1
%span
*display: inline
*float: left
+span-x($grid-columns)
+fixed-grid-widths($grid-columns)