singularitygs 0.0.13.1 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/singularitygs.rb +2 -2
- data/stylesheets/_singularitygs.scss +8 -0
- metadata +3 -20
- data/stylesheets/singularitygs/_background-grid.scss +0 -26
- data/stylesheets/singularitygs/_column.scss +0 -50
- data/stylesheets/singularitygs/_grid-plugins.scss +0 -2
- data/stylesheets/singularitygs/_grid-structure.scss +0 -4
- data/stylesheets/singularitygs/_grid-test.scss +0 -54
- data/stylesheets/singularitygs/_grid.scss +0 -3
- data/stylesheets/singularitygs/_gridsets.scss +0 -252
- data/stylesheets/singularitygs/_gutter.scss +0 -11
- data/stylesheets/singularitygs/_helpers.scss +0 -43
- data/stylesheets/singularitygs/_mixins.scss +0 -78
- data/stylesheets/singularitygs/grid-plugins/_compound.scss +0 -46
- data/stylesheets/singularitygs/grid-plugins/_ratio.scss +0 -20
- data/stylesheets/singularitygs/grid-structure/_structure-clear.scss +0 -32
- data/stylesheets/singularitygs/grid-structure/_structure-display-table.scss +0 -1
- data/stylesheets/singularitygs/grid-structure/_structure-float.scss +0 -103
- data/stylesheets/singularitygs/grid-structure/_structure-grid-layout.scss +0 -1
data/lib/singularitygs.rb
CHANGED
@@ -30,6 +30,14 @@ $paddings: () !default;
|
|
30
30
|
|
31
31
|
$grids-mobile-first: true !default;
|
32
32
|
|
33
|
+
// Container Nonsense
|
34
|
+
$container: 100% !default;
|
35
|
+
$containers: () !default;
|
36
|
+
$container-to-ems: false !default;
|
37
|
+
|
38
|
+
// Base Font Size
|
39
|
+
$base-font-size: 1em !default;
|
40
|
+
|
33
41
|
// Helpers return think like list sums and column counts
|
34
42
|
@import "singularitygs/helpers";
|
35
43
|
|
metadata
CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.0.13.1
|
8
|
+
- 14
|
9
|
+
version: 0.0.14
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Scott Kellum
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2012-10-
|
18
|
+
date: 2012-10-10 00:00:00 -04:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
@@ -88,22 +87,6 @@ extra_rdoc_files: []
|
|
88
87
|
files:
|
89
88
|
- lib/singularitygs.rb
|
90
89
|
- stylesheets/_singularitygs.scss
|
91
|
-
- stylesheets/singularitygs/_background-grid.scss
|
92
|
-
- stylesheets/singularitygs/_column.scss
|
93
|
-
- stylesheets/singularitygs/_grid-plugins.scss
|
94
|
-
- stylesheets/singularitygs/_grid-structure.scss
|
95
|
-
- stylesheets/singularitygs/_grid-test.scss
|
96
|
-
- stylesheets/singularitygs/_grid.scss
|
97
|
-
- stylesheets/singularitygs/_gridsets.scss
|
98
|
-
- stylesheets/singularitygs/_gutter.scss
|
99
|
-
- stylesheets/singularitygs/_helpers.scss
|
100
|
-
- stylesheets/singularitygs/_mixins.scss
|
101
|
-
- stylesheets/singularitygs/grid-plugins/_compound.scss
|
102
|
-
- stylesheets/singularitygs/grid-plugins/_ratio.scss
|
103
|
-
- stylesheets/singularitygs/grid-structure/_structure-clear.scss
|
104
|
-
- stylesheets/singularitygs/grid-structure/_structure-display-table.scss
|
105
|
-
- stylesheets/singularitygs/grid-structure/_structure-float.scss
|
106
|
-
- stylesheets/singularitygs/grid-structure/_structure-grid-layout.scss
|
107
90
|
- templates/project/behaviors/box-sizing/boxsizing.htc
|
108
91
|
- templates/project/behaviors/box-sizing/boxsizing.php
|
109
92
|
- templates/project/manifest.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
// Write stops for single columns
|
2
|
-
@function grid-gradient-stop($location, $columns, $gutter, $color) {
|
3
|
-
@if $location == 1 {
|
4
|
-
@return $color 0%, $color column-span(1, 1, $columns), transparentize($color, 1) column-span(1, 1, $columns);
|
5
|
-
}
|
6
|
-
@if $location == column-count($columns) {
|
7
|
-
@return transparentize($color, 1) column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color 100%;
|
8
|
-
}
|
9
|
-
@if $location > 1 {
|
10
|
-
@return transparentize($color, 1) column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location - 1, 1, $columns) + gutter-span($gutter, $columns), $color column-span($location, 1, $columns), transparentize($color, 1) column-span($location, 1, $columns);
|
11
|
-
}
|
12
|
-
}
|
13
|
-
|
14
|
-
// Compiling grid stops
|
15
|
-
@function grid-gradient-stops($columns, $gutter, $color) {
|
16
|
-
$list: ();
|
17
|
-
@for $i from 1 through column-count($columns) {
|
18
|
-
$list: join($list, grid-gradient-stop($i, $columns, $gutter, $color), comma);
|
19
|
-
}
|
20
|
-
@return $list;
|
21
|
-
}
|
22
|
-
|
23
|
-
// Pull in grid stops to make a background gradient
|
24
|
-
@mixin background-grid($columns: $columns, $gutter: $gutter, $color: rgba(#69aedb, 0.5)) {
|
25
|
-
@include background(linear-gradient(left, grid-gradient-stops($columns, $gutter, $color)));
|
26
|
-
}
|
@@ -1,50 +0,0 @@
|
|
1
|
-
// calculate the width of individual columns
|
2
|
-
//@function list-column-width($location, $columns) {
|
3
|
-
// // send a warning if this is used when $columns is not a list
|
4
|
-
// @if type-of($columns) != list {
|
5
|
-
// @warn "The column-list-sum function requires the variable $columns to be a list.";
|
6
|
-
// }
|
7
|
-
// @else {
|
8
|
-
// // divide the column from its context
|
9
|
-
// @return nth(nth($columns, $location), 1) / list-sum($columns);
|
10
|
-
// }
|
11
|
-
//}
|
12
|
-
|
13
|
-
// Calculate the width spanning multiple columns
|
14
|
-
@function column-span($span, $location: 1, $columns: $columns) {
|
15
|
-
$columns-and-gutters: column-sum($columns, $gutter);
|
16
|
-
|
17
|
-
// Equal width columns
|
18
|
-
@if type-of($columns) == number {
|
19
|
-
$span-and-gutter: $span + (($span - 1) * $gutter);
|
20
|
-
@return $span-and-gutter / $columns-and-gutters * 100%;
|
21
|
-
}
|
22
|
-
// Variable width columns
|
23
|
-
@if type-of($columns) == list {
|
24
|
-
// zero out initial sum
|
25
|
-
$sum: 0;
|
26
|
-
$holder: ();
|
27
|
-
// from start point to end point
|
28
|
-
@for $i from $location to $location + $span {
|
29
|
-
$holder: append($holder, nth(nth($columns, $i), 1), comma);
|
30
|
-
}
|
31
|
-
|
32
|
-
@return column-sum($holder, $gutter) / $columns-and-gutters * 100%;
|
33
|
-
}
|
34
|
-
|
35
|
-
@return 10%;
|
36
|
-
}
|
37
|
-
|
38
|
-
@function column-sum($columns: $columns, $gutter: $gutter) {
|
39
|
-
@if type-of($columns) == 'number' {
|
40
|
-
@return $columns + ((column-count($columns) - 1) * $gutter);
|
41
|
-
}
|
42
|
-
@else if type-of($columns) == 'list' {
|
43
|
-
$sum: 0;
|
44
|
-
@each $column in $columns {
|
45
|
-
$sum: $sum + nth($column, 1);
|
46
|
-
}
|
47
|
-
$sum: $sum + (column-count($columns) - 1) * $gutter;
|
48
|
-
@return $sum;
|
49
|
-
}
|
50
|
-
}
|
@@ -1,54 +0,0 @@
|
|
1
|
-
@mixin test-grid($columns: $columns, $gutter: $gutter, $padding: $padding, $prefix: a, $color: #66bbbb) {
|
2
|
-
.test-grid {
|
3
|
-
height: 200px;
|
4
|
-
width: 100%;
|
5
|
-
}
|
6
|
-
$grid-counter: 1;
|
7
|
-
@for $i from 1 through column-count($columns) {
|
8
|
-
.test.#{$prefix}#{$i} {
|
9
|
-
height: 100%;
|
10
|
-
@include grid-span(1, $i, $columns: $columns, $gutter: $gutter, $padding: $padding);
|
11
|
-
background-color: transparentize($color, 0.5);
|
12
|
-
.inner {
|
13
|
-
height: 100%;
|
14
|
-
background-color: transparentize($color, 0.5);
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
18
|
-
}
|
19
|
-
|
20
|
-
// Need this markup to test
|
21
|
-
//<div class="test-grid">
|
22
|
-
//<div class="test a1"><div class="inner"></div></div>
|
23
|
-
//<div class="test a2"><div class="inner"></div></div>
|
24
|
-
//<div class="test a3"><div class="inner"></div></div>
|
25
|
-
//<div class="test a4"><div class="inner"></div></div>
|
26
|
-
//<div class="test a5"><div class="inner"></div></div>
|
27
|
-
//<div class="test a6"><div class="inner"></div></div>
|
28
|
-
//<div class="test a7"><div class="inner"></div></div>
|
29
|
-
//<div class="test a8"><div class="inner"></div></div>
|
30
|
-
//<div class="test a9"><div class="inner"></div></div>
|
31
|
-
//<div class="test a10"><div class="inner"></div></div>
|
32
|
-
//<div class="test a11"><div class="inner"></div></div>
|
33
|
-
//<div class="test a12"><div class="inner"></div></div>
|
34
|
-
//<div class="test a13"><div class="inner"></div></div>
|
35
|
-
//<div class="test a14"><div class="inner"></div></div>
|
36
|
-
//<div class="test a15"><div class="inner"></div></div>
|
37
|
-
//<div class="test a16"><div class="inner"></div></div>
|
38
|
-
//<div class="test a17"><div class="inner"></div></div>
|
39
|
-
//<div class="test a18"><div class="inner"></div></div>
|
40
|
-
//<div class="test a19"><div class="inner"></div></div>
|
41
|
-
//<div class="test a20"><div class="inner"></div></div>
|
42
|
-
//<div class="test a21"><div class="inner"></div></div>
|
43
|
-
//<div class="test a22"><div class="inner"></div></div>
|
44
|
-
//<div class="test a23"><div class="inner"></div></div>
|
45
|
-
//<div class="test a24"><div class="inner"></div></div>
|
46
|
-
//<div class="test a25"><div class="inner"></div></div>
|
47
|
-
//<div class="test a26"><div class="inner"></div></div>
|
48
|
-
//<div class="test a27"><div class="inner"></div></div>
|
49
|
-
//<div class="test a28"><div class="inner"></div></div>
|
50
|
-
//<div class="test a29"><div class="inner"></div></div>
|
51
|
-
//<div class="test a30"><div class="inner"></div></div>
|
52
|
-
//<div class="test a31"><div class="inner"></div></div>
|
53
|
-
//<div class="test a32"><div class="inner"></div></div>
|
54
|
-
//</div>
|
@@ -1,252 +0,0 @@
|
|
1
|
-
// Converted old Gridset into Grid Span.
|
2
|
-
@mixin grid-span($span, $location, $columns: $columns, $gutter-span: $gutter, $padding-span: $padding) {
|
3
|
-
$length: length($grids);
|
4
|
-
|
5
|
-
@if $length > 0 {
|
6
|
-
$query-min: breakpoint-get-context('min-width');
|
7
|
-
$query-max: breakpoint-get-context('max-width');
|
8
|
-
|
9
|
-
@if $query-min {
|
10
|
-
$query-min: breakpoint-to-base-em($query-min);
|
11
|
-
}
|
12
|
-
@if $query-max {
|
13
|
-
$query-max: breakpoint-to-base-em($query-max);
|
14
|
-
}
|
15
|
-
|
16
|
-
$written: false;
|
17
|
-
|
18
|
-
$gutter-length: length($gutters);
|
19
|
-
$gutter-span: false;
|
20
|
-
$padding-span: false;
|
21
|
-
$padding-length: length($paddings);
|
22
|
-
|
23
|
-
$ghr: () !default;
|
24
|
-
$ghs: () !default;
|
25
|
-
$phs: () !default;
|
26
|
-
|
27
|
-
@if $query-min or $query-max {
|
28
|
-
@for $j from 2 through $length {
|
29
|
-
$ghr: append($ghr, nth($grids, $j), comma);
|
30
|
-
}
|
31
|
-
|
32
|
-
@for $j from 2 through $length {
|
33
|
-
@if $gutter-length == 0 {
|
34
|
-
$ghs: append($ghs, $gutter);
|
35
|
-
}
|
36
|
-
@else if $j > $gutter-length {
|
37
|
-
$ghs: append($ghs, nth($gutters, $gutter-length));
|
38
|
-
}
|
39
|
-
@else {
|
40
|
-
$ghs: append($ghs, nth($gutters, $j));
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
@for $j from 2 through $length {
|
45
|
-
@if $padding-length == 0 {
|
46
|
-
$phs: append($phs, $padding);
|
47
|
-
}
|
48
|
-
@else if $j > $padding-length {
|
49
|
-
$phs: append($phs, nth($paddings, $padding-length));
|
50
|
-
}
|
51
|
-
@else {
|
52
|
-
$phs: append($phs, nth($paddings, $j));
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
$ghr: reverse($ghr);
|
57
|
-
|
58
|
-
$gthr: reverse($ghs);
|
59
|
-
$phr: reverse($phs);
|
60
|
-
|
61
|
-
$holder-length: length($ghr);
|
62
|
-
|
63
|
-
@for $i from 1 through $holder-length {
|
64
|
-
$gridholder: nth($ghr, $i);
|
65
|
-
|
66
|
-
$grid-columns: nth($gridholder, 1);
|
67
|
-
$grid-query: nth($gridholder, 2);
|
68
|
-
|
69
|
-
$grid-query: breakpoint-to-base-em($grid-query);
|
70
|
-
|
71
|
-
@if length($gridholder) < 2 {
|
72
|
-
@warn 'Grid #{$gridholder} needs a breakpoint value!';
|
73
|
-
}
|
74
|
-
@else if not $written {
|
75
|
-
@if $grids-mobile-first {
|
76
|
-
@if $query-min and not $query-max {
|
77
|
-
@if $query-min and $query-max {
|
78
|
-
@if $query-min >= $grid-query and $query-max < $grid-query {
|
79
|
-
@if $gutter-span== false {
|
80
|
-
@if $gutter-length > 0 {
|
81
|
-
$gutter-span: nth($gthr, $i);
|
82
|
-
}
|
83
|
-
@else {
|
84
|
-
$gutter-span: $gutter;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
@if $padding-span == false {
|
88
|
-
@if $padding-length > 0 {
|
89
|
-
$padding-span: nth($phr, $i);
|
90
|
-
}
|
91
|
-
@else {
|
92
|
-
$padding-span: $padding;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
@include grid-build($span, $location, $grid-columns, $gutter-span, $paddings);
|
96
|
-
$written: true;
|
97
|
-
$gutter-span: false;
|
98
|
-
$padding-span: false;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
@else if $query-min >= $grid-query {
|
102
|
-
@if $gutter-span== false {
|
103
|
-
@if $gutter-length > 0 {
|
104
|
-
$gutter-span: nth($gthr, $i);
|
105
|
-
}
|
106
|
-
@else {
|
107
|
-
$gutter-span: $gutter;
|
108
|
-
}
|
109
|
-
}
|
110
|
-
@if $padding-span == false {
|
111
|
-
@if $padding-length > 0 {
|
112
|
-
$padding-span: nth($phr, $i);
|
113
|
-
}
|
114
|
-
@else {
|
115
|
-
$padding-span: $padding;
|
116
|
-
}
|
117
|
-
}
|
118
|
-
@include grid-build($span, $location, $grid-columns, $gutter-span, $padding-span);
|
119
|
-
$written: true;
|
120
|
-
$gutter-span: false;
|
121
|
-
$padding-span: false;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
@else {
|
125
|
-
@if $query-max < $grid-query {
|
126
|
-
@if $gutter-span== false {
|
127
|
-
@if $gutter-length > 0 {
|
128
|
-
$gutter-span: nth($gthr, $i);
|
129
|
-
}
|
130
|
-
@else {
|
131
|
-
$gutter-span: $gutter;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
@if $padding-span == false {
|
135
|
-
@if $padding-length > 0 {
|
136
|
-
$padding-span: nth($phr, $i);
|
137
|
-
}
|
138
|
-
@else {
|
139
|
-
$padding-span: $padding;
|
140
|
-
}
|
141
|
-
}
|
142
|
-
@include grid-build($span, $location, $grid-columns, $gutter-span, $padding-span);
|
143
|
-
$written: true;
|
144
|
-
$gutter-span: false;
|
145
|
-
$padding-span: false;
|
146
|
-
}
|
147
|
-
}
|
148
|
-
}
|
149
|
-
@else {
|
150
|
-
@if $query-min and $query-max {
|
151
|
-
@if $gutter-span== false {
|
152
|
-
@if $gutter-length > 0 {
|
153
|
-
$gutter-span: nth($gthr, $i);
|
154
|
-
}
|
155
|
-
@else {
|
156
|
-
$gutter-span: $gutter;
|
157
|
-
}
|
158
|
-
}
|
159
|
-
@if $padding-span == false {
|
160
|
-
@if $padding-length > 0 {
|
161
|
-
$padding-span: nth($phr, $i);
|
162
|
-
}
|
163
|
-
@else {
|
164
|
-
$padding-span: $padding;
|
165
|
-
}
|
166
|
-
}
|
167
|
-
@if $query-min > $grid-query and $query-max <= $grid-query {
|
168
|
-
@include grid-build($span, $location, $grid-columns, $gutter-span, $padding-span);
|
169
|
-
$written: true;
|
170
|
-
$gutter-span: false;
|
171
|
-
$padding-span: false;
|
172
|
-
}
|
173
|
-
}
|
174
|
-
@else if $query-min and not $query-max {
|
175
|
-
@if $query-min > $grid-query {
|
176
|
-
@if $gutter-span== false {
|
177
|
-
@if $gutter-length > 0 {
|
178
|
-
$gutter-span: nth($gthr, $i);
|
179
|
-
}
|
180
|
-
@else {
|
181
|
-
$gutter-span: $gutter;
|
182
|
-
}
|
183
|
-
}
|
184
|
-
@if $padding-span == false {
|
185
|
-
@if $padding-length > 0 {
|
186
|
-
$padding-span: nth($phr, $i);
|
187
|
-
}
|
188
|
-
@else {
|
189
|
-
$padding-span: $padding;
|
190
|
-
}
|
191
|
-
}
|
192
|
-
@include grid-build($span, $location, $grid-columns, $gutter-span, $padding-span);
|
193
|
-
$written: true;
|
194
|
-
$gutter-span: false;
|
195
|
-
$padding-span: false;
|
196
|
-
}
|
197
|
-
}
|
198
|
-
@else {
|
199
|
-
@if $query-max <= $grid-query {
|
200
|
-
@if $gutter-span== false {
|
201
|
-
@if $gutter-length > 0 {
|
202
|
-
$gutter-span: nth($gthr, $i);
|
203
|
-
}
|
204
|
-
@else {
|
205
|
-
$gutter-span: $gutter;
|
206
|
-
}
|
207
|
-
}
|
208
|
-
@if $padding-span == false {
|
209
|
-
@if $padding-length > 0 {
|
210
|
-
$padding-span: nth($phr, $i);
|
211
|
-
}
|
212
|
-
@else {
|
213
|
-
$padding-span: $padding;
|
214
|
-
}
|
215
|
-
}
|
216
|
-
@include grid-build($span, $location, $grid-columns, $gutter-span, $padding-span);
|
217
|
-
$written: true;
|
218
|
-
$gutter-span: false;
|
219
|
-
$padding-span: false;
|
220
|
-
}
|
221
|
-
}
|
222
|
-
}
|
223
|
-
}
|
224
|
-
}
|
225
|
-
}
|
226
|
-
@else {
|
227
|
-
@if $gutter-span== false {
|
228
|
-
@if $gutter-length > 0 {
|
229
|
-
$gutter-span: nth($gutters, 1);
|
230
|
-
}
|
231
|
-
@else {
|
232
|
-
$gutter-span: $gutter;
|
233
|
-
}
|
234
|
-
}
|
235
|
-
|
236
|
-
@if $padding-span == false {
|
237
|
-
@if $padding-length > 0 {
|
238
|
-
$padding-span: nth($paddings, 1);
|
239
|
-
}
|
240
|
-
@else {
|
241
|
-
$padding-span: $padding;
|
242
|
-
}
|
243
|
-
}
|
244
|
-
|
245
|
-
|
246
|
-
@include grid-build($span, $location, nth($grids, 1), $gutter-span, $padding-span);
|
247
|
-
}
|
248
|
-
}
|
249
|
-
@else {
|
250
|
-
@include grid-build($span, $location, $columns, $gutter-span, $padding-span);
|
251
|
-
}
|
252
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
// Gutters to be removed from columns
|
2
|
-
@function gutter-offset($gutter, $columns) {
|
3
|
-
$gutter-sum: $gutter * (column-count($columns) - 1);
|
4
|
-
@return $gutter-sum / column-count($columns);
|
5
|
-
}
|
6
|
-
|
7
|
-
@function gutter-span($gutter, $columns) {
|
8
|
-
$columns-and-gutters: column-sum($columns, $gutter);
|
9
|
-
|
10
|
-
@return $gutter / $columns-and-gutters * 100%;
|
11
|
-
}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
// Calculate the total sum of a list (context)
|
2
|
-
@function list-sum($list) {
|
3
|
-
// zero out the initial sum
|
4
|
-
$sum: 0;
|
5
|
-
// loop through each value in the list adding it to $list-sum
|
6
|
-
@for $i from 1 through length($list) {
|
7
|
-
$sum: $sum + nth(nth($list, $i), 1);
|
8
|
-
}
|
9
|
-
@return nth($sum, 1);
|
10
|
-
}
|
11
|
-
|
12
|
-
// Find column count
|
13
|
-
@function column-count($columns) {
|
14
|
-
@if type-of($columns) == number {
|
15
|
-
@return $columns;
|
16
|
-
}
|
17
|
-
@if type-of($columns) == list {
|
18
|
-
@return length($columns);
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
// Context of gutters
|
23
|
-
@function gutter-context($gutter, $context) {
|
24
|
-
@return $gutter * 100% / $context;
|
25
|
-
}
|
26
|
-
|
27
|
-
@function repeat($count, $repeat) {
|
28
|
-
$list: $repeat;
|
29
|
-
@for $i from 2 through $count {
|
30
|
-
$list: join($repeat, $list);
|
31
|
-
}
|
32
|
-
@return $list;
|
33
|
-
}
|
34
|
-
|
35
|
-
// Reverses direction of a list
|
36
|
-
@function reverse($list) {
|
37
|
-
$length: length($list);
|
38
|
-
$return: ();
|
39
|
-
@for $i from 0 to $length {
|
40
|
-
$return: append($return, nth($list, $length - $i), comma);
|
41
|
-
}
|
42
|
-
@return $return;
|
43
|
-
}
|
@@ -1,78 +0,0 @@
|
|
1
|
-
// Converted old Grid Span into Grid Build
|
2
|
-
// It a piece of cake to make a pretty grid, CAKE!
|
3
|
-
@mixin grid-build($span, $location, $columns, $gutter, $padding) {
|
4
|
-
@include box-sizing(border-box);
|
5
|
-
*behavior: url('../behaviors/box-sizing/boxsizing.php');
|
6
|
-
width: grid-span($span, $location, $columns, $gutter);
|
7
|
-
@if $grid-structure == float {
|
8
|
-
@include structure-float($span, $location, $columns, $gutter);
|
9
|
-
}
|
10
|
-
// add special left padding
|
11
|
-
@if type-of($columns) == list {
|
12
|
-
@if type-of(nth($columns, $location)) == list {
|
13
|
-
padding-left: nth(nth($columns, $location), 2);
|
14
|
-
}
|
15
|
-
@else if $padding != 0 {
|
16
|
-
padding-left: $padding;
|
17
|
-
}
|
18
|
-
// add special right padding
|
19
|
-
@if type-of(nth($columns, $location + $span - 1)) == list {
|
20
|
-
padding-right: nth(nth($columns, $location + $span - 1), 2);
|
21
|
-
}
|
22
|
-
@else if $padding != 0 {
|
23
|
-
padding-right: $padding;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
@else if $padding != 0 {
|
27
|
-
padding: 0 $padding;
|
28
|
-
}
|
29
|
-
// bump up the counter
|
30
|
-
$grid-counter: $location + $span;
|
31
|
-
@if $grid-counter > column-count($columns) {
|
32
|
-
$grid-counter: 1;
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
// This writes classes, IDs, or silent objects for you to extend or use in your HTML. They can be written to different breakpoints to extend or call into your HTML as needed.
|
37
|
-
@mixin grid-objects($prefix: a, $columns: $columns, $gutter: $gutter, $padding: $padding, $selector: "%") {
|
38
|
-
$grouped-styles: true;
|
39
|
-
// counter keeps track of the starting position
|
40
|
-
$count: 0;
|
41
|
-
%#{$prefix}column {
|
42
|
-
@if $dir == ltr or $dir == both {
|
43
|
-
margin-right: -100%;
|
44
|
-
float: left;
|
45
|
-
}
|
46
|
-
@if $dir == rtl {
|
47
|
-
margin-left: -100%;
|
48
|
-
float: right;
|
49
|
-
}
|
50
|
-
@if $dir == both {
|
51
|
-
#{$rtl-selector} & {
|
52
|
-
margin-left: -100%;
|
53
|
-
float: right;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
float: left;
|
57
|
-
@include grid-padding($padding);
|
58
|
-
margin-right: $gutter;
|
59
|
-
}
|
60
|
-
@for $i from 1 through column-count($columns) {
|
61
|
-
@for $n from $count + 1 through column-count($columns) {
|
62
|
-
#{$selector}#{$prefix}#{$count}-#{$n} {
|
63
|
-
@extend %#{$prefix}column;
|
64
|
-
@include grid-span($n - $count, $count + 1, $columns, $gutter);
|
65
|
-
}
|
66
|
-
}
|
67
|
-
$count: $count + 1;
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
|
-
// Add padding to an object on the grid.
|
72
|
-
@mixin grid-padding($padding) {
|
73
|
-
@if $padding != 0 {
|
74
|
-
padding: 0 $padding;
|
75
|
-
@include box-sizing(border-box);
|
76
|
-
*behavior: url('../behaviors/box-sizing/boxsizing.php');
|
77
|
-
}
|
78
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
@function compound($c1: 1, $c2: 1, $c3: 1, $c4: 1, $c5: 1, $c6: 1) {
|
2
|
-
$common-multiple: $c1 * $c2 * $c3 * $c4 * $c5 * $c6;
|
3
|
-
$compound-grid: ();
|
4
|
-
$compound-counter: 1;
|
5
|
-
@for $i from 1 through $common-multiple {
|
6
|
-
$add-col: false;
|
7
|
-
@if $c1 != 1 {
|
8
|
-
@if $i / $c1 == round($i / $c1) {
|
9
|
-
$add-col: true;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
@if $c2 != 1 {
|
13
|
-
@if $i / $c2 == round($i / $c2) {
|
14
|
-
$add-col: true;
|
15
|
-
}
|
16
|
-
}
|
17
|
-
@if $c3 != 1 {
|
18
|
-
@if $i / $c3 == round($i / $c3) {
|
19
|
-
$add-col: true;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
@if $c4 != 1 {
|
23
|
-
@if $i / $c4 == round($i / $c4) {
|
24
|
-
$add-col: true;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
@if $c5 != 1 {
|
28
|
-
@if $i / $c5 == round($i / $c5) {
|
29
|
-
$add-col: true;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
@if $c6 != 1 {
|
33
|
-
@if $i / $c6 == round($i / $c6) {
|
34
|
-
$add-col: true;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
@if $add-col {
|
38
|
-
$compound-grid: join($compound-grid, $compound-counter, comma);
|
39
|
-
$compound-counter: 1;
|
40
|
-
}
|
41
|
-
@else {
|
42
|
-
$compound-counter: $compound-counter + 1;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
@return $compound-grid;
|
46
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
// Creates a list based on a ratio
|
2
|
-
// Valid options for $start: 'large' or 'small'
|
3
|
-
@function ratio($ratio, $steps, $start: 'small') {
|
4
|
-
$x: 1;
|
5
|
-
$return: ();
|
6
|
-
|
7
|
-
@for $i from 0 through $steps - 1 {
|
8
|
-
$xr: $x * pow($ratio, $i);
|
9
|
-
$return: append($return, $xr, comma);
|
10
|
-
}
|
11
|
-
|
12
|
-
@if $start == 'small' and $ratio < 1 {
|
13
|
-
$return: reverse($return);
|
14
|
-
}
|
15
|
-
@else if $start == 'large' and $ratio > 1 {
|
16
|
-
$return: reverse($return);
|
17
|
-
}
|
18
|
-
|
19
|
-
@return $return;
|
20
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
$legacy-support-for-ie6: true !default;
|
2
|
-
$legacy-support-for-ie7: true !default;
|
3
|
-
|
4
|
-
@mixin grid-clear($clear-dir) {
|
5
|
-
@if $clear-dir == 'left' {
|
6
|
-
clear: right;
|
7
|
-
}
|
8
|
-
@else if $clear-dir == 'right' {
|
9
|
-
clear: left;
|
10
|
-
}
|
11
|
-
@else if $clear-dir == 'both' {
|
12
|
-
clear: both;
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
&:before,
|
17
|
-
&:after {
|
18
|
-
content: "";
|
19
|
-
display: table;
|
20
|
-
}
|
21
|
-
|
22
|
-
&:after {
|
23
|
-
clear: both;
|
24
|
-
}
|
25
|
-
|
26
|
-
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
27
|
-
/* for IE 6/7 */
|
28
|
-
*zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
|
29
|
-
}
|
30
|
-
/* non-JS fallback */
|
31
|
-
*zoom: 1;
|
32
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1,103 +0,0 @@
|
|
1
|
-
@mixin grid-clear($dir) {
|
2
|
-
@if $dir == 'left' {
|
3
|
-
clear: right;
|
4
|
-
}
|
5
|
-
@else if $dir == 'right' {
|
6
|
-
clear: left;
|
7
|
-
}
|
8
|
-
@else if $dir == 'both' {
|
9
|
-
clear: both;
|
10
|
-
}
|
11
|
-
|
12
|
-
@include clearfix;
|
13
|
-
}
|
14
|
-
|
15
|
-
@mixin structure-float($span, $location: $grid-counter, $columns: $columns, $gutter: $gutter, $grouped-styles: false) {
|
16
|
-
|
17
|
-
$grid-location: '';
|
18
|
-
|
19
|
-
@if ($span + $location) > column-count($columns) {
|
20
|
-
$grid-location: 'last';
|
21
|
-
}
|
22
|
-
@else if $location == 1 {
|
23
|
-
$grid-location: 'first';
|
24
|
-
}
|
25
|
-
@else if $location == column-count($columns) {
|
26
|
-
$grid-location: 'last';
|
27
|
-
}
|
28
|
-
@else {
|
29
|
-
$grid-location: 'middle';
|
30
|
-
}
|
31
|
-
|
32
|
-
@if $dir == ltr or $dir == both {
|
33
|
-
@if $grid-location == 'middle' {
|
34
|
-
@if $grouped-styles == false {
|
35
|
-
margin-right: -100%;
|
36
|
-
float: left;
|
37
|
-
@include grid-clear('left');
|
38
|
-
}
|
39
|
-
margin-left: grid-span($location - 1, 1, $columns, $gutter) + gutter-span($gutter, $columns);
|
40
|
-
}
|
41
|
-
@else if $grid-location == 'first' {
|
42
|
-
@if $grouped-styles == false {
|
43
|
-
margin-right: -100%;
|
44
|
-
float: left;
|
45
|
-
@include grid-clear('left');
|
46
|
-
}
|
47
|
-
margin-left: 0;
|
48
|
-
}
|
49
|
-
@else if $grid-location == 'last' {
|
50
|
-
float: right;
|
51
|
-
margin-right: 0;
|
52
|
-
@include grid-clear('left');
|
53
|
-
}
|
54
|
-
}
|
55
|
-
@if $dir == rtl {
|
56
|
-
@if $grid-location == 'middle' {
|
57
|
-
@if $grouped-styles == false {
|
58
|
-
margin-left: -100%;
|
59
|
-
float: right;
|
60
|
-
@include grid-clear('right');
|
61
|
-
}
|
62
|
-
margin-right: grid-span($location - 1, 1, $columns, $gutter) + gutter-span($gutter, $columns);
|
63
|
-
}
|
64
|
-
@else if grid-location == 'first' {
|
65
|
-
@if $grouped-styles == false {
|
66
|
-
margin-left: -100%;
|
67
|
-
float: right;
|
68
|
-
@include grid-clear('right');
|
69
|
-
}
|
70
|
-
margin-right: 0;
|
71
|
-
}
|
72
|
-
@else if $grid-location == 'last' {
|
73
|
-
float: left;
|
74
|
-
margin-left: 0;
|
75
|
-
@include grid-clear('right');
|
76
|
-
}
|
77
|
-
}
|
78
|
-
@if $dir == both {
|
79
|
-
#{$rtl-selector} & {
|
80
|
-
@if $grid-location == 'middle' {
|
81
|
-
@if $grouped-styles == false {
|
82
|
-
margin-left: -100%;
|
83
|
-
float: right;
|
84
|
-
@include grid-clear('right');
|
85
|
-
}
|
86
|
-
margin-right: grid-span($location - 1, 1, $columns, $gutter) + gutter-span($gutter, $columns);
|
87
|
-
}
|
88
|
-
@if $grid-location == 'first' {
|
89
|
-
@if $grouped-styles == false {
|
90
|
-
margin-left: -100%;
|
91
|
-
float: right;
|
92
|
-
@include grid-clear('right');
|
93
|
-
}
|
94
|
-
margin-right: 0;
|
95
|
-
}
|
96
|
-
@if $grid-location == 'last' {
|
97
|
-
float: left;
|
98
|
-
margin-left: 0;
|
99
|
-
@include grid-clear('right');
|
100
|
-
}
|
101
|
-
}
|
102
|
-
}
|
103
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
|