singularitygs 0.0.16 → 0.0.17
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 +7 -11
- data/stylesheets/singularitygs/_helpers.scss +3 -43
- data/stylesheets/singularitygs/_mixins.scss +7 -222
- data/stylesheets/singularitygs/grid-structure/{_structure-display-table.scss → _display-table.scss} +0 -0
- data/stylesheets/singularitygs/grid-structure/_flexbox.scss +0 -0
- data/stylesheets/singularitygs/grid-structure/_float.scss +94 -0
- data/stylesheets/singularitygs/grid-structure/{_structure-grid-layout.scss → _grid-layout.scss} +0 -0
- data/stylesheets/singularitygs/grid-structure/_isolation.scss +145 -0
- data/stylesheets/singularitygs/helpers/_grids.scss +34 -0
- data/stylesheets/singularitygs/helpers/_gridsets.scss +362 -0
- data/stylesheets/singularitygs/helpers/_lists.scss +29 -0
- data/stylesheets/singularitygs/mixins/_base-font-size.scss +63 -0
- data/stylesheets/singularitygs/mixins/_container.scss +63 -0
- data/stylesheets/singularitygs/mixins/_grid-build.scss +16 -0
- data/stylesheets/singularitygs/mixins/_grid-objects.scss +26 -0
- data/stylesheets/singularitygs/mixins/_grid-padding.scss +8 -0
- data/stylesheets/singularitygs/mixins/_grid-span.scss +9 -0
- data/stylesheets/singularitygs/mixins/_push-pull.scss +41 -0
- metadata +18 -8
- data/stylesheets/singularitygs/_grid-structure.scss +0 -3
- data/stylesheets/singularitygs/_gridsets.scss +0 -252
- data/stylesheets/singularitygs/grid-structure/_structure-float.scss +0 -103
@@ -0,0 +1,362 @@
|
|
1
|
+
//////////////////////////////
|
2
|
+
// Find Grid
|
3
|
+
//
|
4
|
+
// Finds the grid that you are on
|
5
|
+
//////////////////////////////
|
6
|
+
@function find-grid($user-columns: false) {
|
7
|
+
$length: length($grids);
|
8
|
+
|
9
|
+
@if $user-columns != false {
|
10
|
+
@return $user-columns;
|
11
|
+
}
|
12
|
+
@else if $length > 0 {
|
13
|
+
$query-min: breakpoint-get-context('min-width');
|
14
|
+
$query-max: breakpoint-get-context('max-width');
|
15
|
+
|
16
|
+
@if $query-min {
|
17
|
+
$query-min: breakpoint-to-base-em($query-min);
|
18
|
+
}
|
19
|
+
@if $query-max {
|
20
|
+
$query-max: breakpoint-to-base-em($query-max);
|
21
|
+
}
|
22
|
+
|
23
|
+
$ghr: () !default;
|
24
|
+
|
25
|
+
@if $query-min or $query-max {
|
26
|
+
@for $j from 2 through $length {
|
27
|
+
$ghr: append($ghr, nth($grids, $j), comma);
|
28
|
+
}
|
29
|
+
|
30
|
+
$ghr: reverse($ghr);
|
31
|
+
|
32
|
+
$holder-length: length($ghr);
|
33
|
+
|
34
|
+
@for $i from 1 through $holder-length {
|
35
|
+
$gridholder: nth($ghr, $i);
|
36
|
+
|
37
|
+
$grid-columns: nth($gridholder, 1);
|
38
|
+
$grid-query: nth($gridholder, 2);
|
39
|
+
|
40
|
+
$grid-query: breakpoint-to-base-em($grid-query);
|
41
|
+
|
42
|
+
@if length($gridholder) < 2 {
|
43
|
+
@warn 'Grid #{$gridholder} needs a breakpoint value!';
|
44
|
+
}
|
45
|
+
@else if $grids-mobile-first {
|
46
|
+
@if $query-min and not $query-max {
|
47
|
+
@if $query-min and $query-max {
|
48
|
+
@if $query-min >= $grid-query and $query-max < $grid-query {
|
49
|
+
@return $grid-columns;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
@else if $query-min >= $grid-query {
|
53
|
+
@return $grid-columns;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
@else {
|
57
|
+
@if $query-max < $grid-query {
|
58
|
+
@return $grid-columns;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
@else {
|
63
|
+
@if $query-min and $query-max {
|
64
|
+
@if $query-min > $grid-query and $query-max <= $grid-query {
|
65
|
+
@return $grid-columns;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
@else if $query-min and not $query-max {
|
69
|
+
@if $query-min > $grid-query {
|
70
|
+
@return $grid-columns;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
@else {
|
74
|
+
@if $query-max <= $grid-query {
|
75
|
+
@return $grid-columns;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
@else {
|
82
|
+
@return nth($grids, 1);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
@else {
|
86
|
+
@return $columns;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
//////////////////////////////
|
91
|
+
// Find Gutters
|
92
|
+
//
|
93
|
+
// Finds the gutter that you should be using
|
94
|
+
//////////////////////////////
|
95
|
+
@function find-gutter($user-gutter: false) {
|
96
|
+
$length: length($grids);
|
97
|
+
|
98
|
+
@if $user-gutter != false {
|
99
|
+
@return $user-gutter;
|
100
|
+
}
|
101
|
+
@else if $length > 0 {
|
102
|
+
$query-min: breakpoint-get-context('min-width');
|
103
|
+
$query-max: breakpoint-get-context('max-width');
|
104
|
+
|
105
|
+
@if $query-min {
|
106
|
+
$query-min: breakpoint-to-base-em($query-min);
|
107
|
+
}
|
108
|
+
@if $query-max {
|
109
|
+
$query-max: breakpoint-to-base-em($query-max);
|
110
|
+
}
|
111
|
+
|
112
|
+
$ghr: () !default;
|
113
|
+
$ghs: () !default;
|
114
|
+
$gutter-length: length($gutters);
|
115
|
+
|
116
|
+
@if $query-min or $query-max {
|
117
|
+
@for $j from 2 through $length {
|
118
|
+
$ghr: append($ghr, nth($grids, $j), comma);
|
119
|
+
|
120
|
+
@if $gutter-length == 0 {
|
121
|
+
$ghs: append($ghs, $gutter);
|
122
|
+
}
|
123
|
+
@else if $j > $gutter-length {
|
124
|
+
$ghs: append($ghs, nth($gutters, $gutter-length));
|
125
|
+
}
|
126
|
+
@else {
|
127
|
+
$ghs: append($ghs, nth($gutters, $j));
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
$ghr: reverse($ghr);
|
132
|
+
$gthr: reverse($ghs);
|
133
|
+
|
134
|
+
$holder-length: length($ghr);
|
135
|
+
|
136
|
+
@for $i from 1 through $holder-length {
|
137
|
+
$gridholder: nth($ghr, $i);
|
138
|
+
|
139
|
+
$grid-columns: nth($gridholder, 1);
|
140
|
+
$grid-query: nth($gridholder, 2);
|
141
|
+
|
142
|
+
$grid-query: breakpoint-to-base-em($grid-query);
|
143
|
+
|
144
|
+
@if length($gridholder) < 2 {
|
145
|
+
@warn 'Grid #{$gridholder} needs a breakpoint value!';
|
146
|
+
}
|
147
|
+
@else if $grids-mobile-first {
|
148
|
+
@if $query-min and not $query-max {
|
149
|
+
@if $query-min and $query-max {
|
150
|
+
@if $query-min >= $grid-query and $query-max < $grid-query {
|
151
|
+
@if $gutter-length > 0 {
|
152
|
+
@return nth($gthr, $i);
|
153
|
+
}
|
154
|
+
@else {
|
155
|
+
@return $gutter;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
@else if $query-min >= $grid-query {
|
160
|
+
@if $gutter-length > 0 {
|
161
|
+
@return nth($gthr, $i);
|
162
|
+
}
|
163
|
+
@else {
|
164
|
+
@return $gutter;
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
168
|
+
@else {
|
169
|
+
@if $query-max < $grid-query {
|
170
|
+
@if $gutter-length > 0 {
|
171
|
+
@return nth($gthr, $i);
|
172
|
+
}
|
173
|
+
@else {
|
174
|
+
@return $gutter;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
@else {
|
180
|
+
@if $query-min and $query-max {
|
181
|
+
@if $query-min > $grid-query and $query-max <= $grid-query {
|
182
|
+
@if $gutter-length > 0 {
|
183
|
+
@return nth($gthr, $i);
|
184
|
+
}
|
185
|
+
@else {
|
186
|
+
@return $gutter;
|
187
|
+
}
|
188
|
+
}
|
189
|
+
}
|
190
|
+
@else if $query-min and not $query-max {
|
191
|
+
@if $query-min > $grid-query {
|
192
|
+
@if $gutter-length > 0 {
|
193
|
+
$gutter-span: nth($gthr, $i);
|
194
|
+
}
|
195
|
+
@else {
|
196
|
+
$gutter-span: $gutter;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}
|
200
|
+
@else {
|
201
|
+
@if $query-max <= $grid-query {
|
202
|
+
@if $gutter-length > 0 {
|
203
|
+
$gutter-span: nth($gthr, $i);
|
204
|
+
}
|
205
|
+
@else {
|
206
|
+
$gutter-span: $gutter;
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
@else {
|
214
|
+
@if length($gutters) > 0 {
|
215
|
+
@return nth($gutters, 1);
|
216
|
+
}
|
217
|
+
@else {
|
218
|
+
@return $gutter;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
}
|
222
|
+
@else {
|
223
|
+
@return $gutter;
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
//////////////////////////////
|
228
|
+
// Find Padding
|
229
|
+
//
|
230
|
+
// Finds the padding that you should be using
|
231
|
+
//////////////////////////////
|
232
|
+
@function find-padding($user-padding: false) {
|
233
|
+
$length: length($grids);
|
234
|
+
|
235
|
+
@if $user-padding != false {
|
236
|
+
@return $user-padding;
|
237
|
+
}
|
238
|
+
@else if $length > 0 {
|
239
|
+
$query-min: breakpoint-get-context('min-width');
|
240
|
+
$query-max: breakpoint-get-context('max-width');
|
241
|
+
|
242
|
+
@if $query-min {
|
243
|
+
$query-min: breakpoint-to-base-em($query-min);
|
244
|
+
}
|
245
|
+
@if $query-max {
|
246
|
+
$query-max: breakpoint-to-base-em($query-max);
|
247
|
+
}
|
248
|
+
|
249
|
+
$ghr: () !default;
|
250
|
+
$phs: () !default;
|
251
|
+
$padding-length: length($paddings);
|
252
|
+
|
253
|
+
@if $query-min or $query-max {
|
254
|
+
@for $j from 2 through $length {
|
255
|
+
$ghr: append($ghr, nth($grids, $j), comma);
|
256
|
+
|
257
|
+
@if $padding-length == 0 {
|
258
|
+
$phs: append($phs, $padding);
|
259
|
+
}
|
260
|
+
@else if $j > $padding-length {
|
261
|
+
$phs: append($phs, nth($paddings, $padding-length));
|
262
|
+
}
|
263
|
+
@else {
|
264
|
+
$phs: append($phs, nth($paddings, $j));
|
265
|
+
}
|
266
|
+
}
|
267
|
+
|
268
|
+
$ghr: reverse($ghr);
|
269
|
+
$phr: reverse($phs);
|
270
|
+
|
271
|
+
$holder-length: length($ghr);
|
272
|
+
|
273
|
+
@for $i from 1 through $holder-length {
|
274
|
+
$gridholder: nth($ghr, $i);
|
275
|
+
|
276
|
+
$grid-columns: nth($gridholder, 1);
|
277
|
+
$grid-query: nth($gridholder, 2);
|
278
|
+
|
279
|
+
$grid-query: breakpoint-to-base-em($grid-query);
|
280
|
+
|
281
|
+
@if length($gridholder) < 2 {
|
282
|
+
@warn 'Grid #{$gridholder} needs a breakpoint value!';
|
283
|
+
}
|
284
|
+
@else if $grids-mobile-first {
|
285
|
+
@if $query-min and not $query-max {
|
286
|
+
@if $query-min and $query-max {
|
287
|
+
@if $query-min >= $grid-query and $query-max < $grid-query {
|
288
|
+
@if $padding-length > 0 {
|
289
|
+
@return nth($phr, $i);
|
290
|
+
}
|
291
|
+
@else {
|
292
|
+
@return $padding;
|
293
|
+
}
|
294
|
+
}
|
295
|
+
}
|
296
|
+
@else if $query-min >= $grid-query {
|
297
|
+
@if $padding-length > 0 {
|
298
|
+
@return nth($phr, $i);
|
299
|
+
}
|
300
|
+
@else {
|
301
|
+
@return $padding;
|
302
|
+
}
|
303
|
+
}
|
304
|
+
}
|
305
|
+
@else {
|
306
|
+
@if $query-max < $grid-query {
|
307
|
+
@if $padding-length > 0 {
|
308
|
+
@return nth($phr, $i);
|
309
|
+
}
|
310
|
+
@else {
|
311
|
+
@return $padding;
|
312
|
+
}
|
313
|
+
}
|
314
|
+
}
|
315
|
+
}
|
316
|
+
@else {
|
317
|
+
@if $query-min and $query-max {
|
318
|
+
@if $query-min > $grid-query and $query-max <= $grid-query {
|
319
|
+
@if $padding-length > 0 {
|
320
|
+
@return nth($phr, $i);
|
321
|
+
}
|
322
|
+
@else {
|
323
|
+
@return $padding;
|
324
|
+
}
|
325
|
+
}
|
326
|
+
}
|
327
|
+
@else if $query-min and not $query-max {
|
328
|
+
@if $query-min > $grid-query {
|
329
|
+
@if $padding-length > 0 {
|
330
|
+
$padding-span: nth($phr, $i);
|
331
|
+
}
|
332
|
+
@else {
|
333
|
+
$padding-span: $padding;
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}
|
337
|
+
@else {
|
338
|
+
@if $query-max <= $grid-query {
|
339
|
+
@if $padding-length > 0 {
|
340
|
+
$padding-span: nth($phr, $i);
|
341
|
+
}
|
342
|
+
@else {
|
343
|
+
$padding-span: $padding;
|
344
|
+
}
|
345
|
+
}
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
}
|
350
|
+
@else {
|
351
|
+
@if length($paddings) > 0 {
|
352
|
+
@return nth($paddings, 1);
|
353
|
+
}
|
354
|
+
@else {
|
355
|
+
@return $padding;
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}
|
359
|
+
@else {
|
360
|
+
@return $padding;
|
361
|
+
}
|
362
|
+
}
|
@@ -0,0 +1,29 @@
|
|
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
|
+
// Repeat a list
|
13
|
+
@function repeat($count, $repeat) {
|
14
|
+
$list: $repeat;
|
15
|
+
@for $i from 2 through $count {
|
16
|
+
$list: join($repeat, $list);
|
17
|
+
}
|
18
|
+
@return $list;
|
19
|
+
}
|
20
|
+
|
21
|
+
// Reverses direction of a list
|
22
|
+
@function reverse($list) {
|
23
|
+
$length: length($list);
|
24
|
+
$return: ();
|
25
|
+
@for $i from 0 to $length {
|
26
|
+
$return: append($return, nth($list, $length - $i), comma);
|
27
|
+
}
|
28
|
+
@return $return;
|
29
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
//////////////////////////////
|
2
|
+
// Base Font Size in HTML tag
|
3
|
+
// NOT DONE YET!
|
4
|
+
//////////////////////////////
|
5
|
+
@mixin base-font-sizing($bfs: $base-font-size) {
|
6
|
+
$bfs-length: length($base-font-size);
|
7
|
+
$query: 'min-width';
|
8
|
+
@if $grids-mobile-first == false {
|
9
|
+
$query: 'max-width';
|
10
|
+
}
|
11
|
+
|
12
|
+
html {
|
13
|
+
font-size: nth($bfs, 1);
|
14
|
+
|
15
|
+
@if $bfs-length > 1 {
|
16
|
+
@for $i from 2 through $bfs-length {
|
17
|
+
@include breakpoint((nth(nth($bfs, $i), 2) $query)) {
|
18
|
+
font-size: nth(nth($bfs, $i), 1);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
////////////////////////////////
|
26
|
+
//// Find Base Font Size
|
27
|
+
////////////////////////////////
|
28
|
+
@function bfs-finder($query) {
|
29
|
+
$context: breakpoint-get-context($query);
|
30
|
+
$reverse: reverse($base-font-size);
|
31
|
+
|
32
|
+
@if $grids-mobile-first == false {
|
33
|
+
$query: 'max-width';
|
34
|
+
}
|
35
|
+
|
36
|
+
@if $query == "min-width" and $context != false {
|
37
|
+
@each $size in $reverse {
|
38
|
+
@if length($size) == 2 {
|
39
|
+
@if nth($size, 2) < $context {
|
40
|
+
@return nth($size, 1);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
@else {
|
44
|
+
@return nth($base-font-size, 1);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
@else if $query == "max-width" and $context != false {
|
49
|
+
@each $size in $reverse {
|
50
|
+
@if length($size) == 2 {
|
51
|
+
@if nth($size, 2) > $context {
|
52
|
+
@return nth($size, 1);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
@else {
|
56
|
+
@return nth($base-font-size, 1);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
@else {
|
61
|
+
@return nth($base-font-size, 1);
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
@mixin container($max-width: $container, $bfs: $base-font-size) {
|
2
|
+
$bfs-length: length($bfs);
|
3
|
+
$bfs-counter: 1;
|
4
|
+
|
5
|
+
@if length($containers) != 0 {
|
6
|
+
$query: 'min-width';
|
7
|
+
@if $grids-mobile-first == false {
|
8
|
+
$query: 'max-width';
|
9
|
+
}
|
10
|
+
|
11
|
+
$total: length($containers);
|
12
|
+
|
13
|
+
@if $total > 1 {
|
14
|
+
@for $i from 2 through $total {
|
15
|
+
|
16
|
+
@include breakpoint((nth(nth($containers, $i), 2) $query)) {
|
17
|
+
$bfs-holder: bfs-finder($query);
|
18
|
+
@if unit(nth(nth($containers, $i), 1)) != '%' and $container-to-ems == true {
|
19
|
+
max-width: base-conversion(nth(nth($containers, $i), 1)) / base-conversion($bfs-holder) * 1em;;
|
20
|
+
}
|
21
|
+
@else {
|
22
|
+
max-width: nth(nth($containers, $i), 1);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
@if unit(nth($containers, 1)) != '%' {
|
28
|
+
max-width: breakpoint-to-base-em(nth($containers, 1), nth($bfs, 1));
|
29
|
+
}
|
30
|
+
@else {
|
31
|
+
max-width: nth($containers, 1);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
@else {
|
35
|
+
@if unit($max-width) != '%' and $container-to-ems == true {
|
36
|
+
max-width: base-conversion($max-width) / base-conversion($bfs) * 1em;
|
37
|
+
}
|
38
|
+
@else {
|
39
|
+
max-width: $max-width;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
// Border box and clearfix
|
44
|
+
@include box-sizing(border-box);
|
45
|
+
*behavior: url('../behaviors/box-sizing/boxsizing.php');
|
46
|
+
|
47
|
+
&:before,
|
48
|
+
&:after {
|
49
|
+
content: "";
|
50
|
+
display: table;
|
51
|
+
}
|
52
|
+
|
53
|
+
&:after {
|
54
|
+
clear: both;
|
55
|
+
}
|
56
|
+
|
57
|
+
@if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
|
58
|
+
/* for IE 6/7 */
|
59
|
+
*zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
|
60
|
+
}
|
61
|
+
/* non-JS fallback */
|
62
|
+
*zoom: 1;
|
63
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@mixin grid-build($span, $location, $columns, $gutter, $padding, $output) {
|
2
|
+
|
3
|
+
|
4
|
+
@if $output == 'isolation' {
|
5
|
+
@include isolation-structure($span, $location, $columns, $gutter, $padding);
|
6
|
+
}
|
7
|
+
@else if $output == 'float' {
|
8
|
+
@include float-structure($span, $location, $columns, $gutter, $padding);
|
9
|
+
}
|
10
|
+
|
11
|
+
// bump up the counter
|
12
|
+
$grid-counter: $location + $span;
|
13
|
+
@if $grid-counter > column-count($columns) {
|
14
|
+
$grid-counter: 1;
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// 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.
|
2
|
+
@mixin grid-objects($prefix: a, $columns: $columns, $gutter: $gutter, $padding: $padding, $selector: "%") {
|
3
|
+
|
4
|
+
$grouped-styles: true;
|
5
|
+
|
6
|
+
// counter keeps track of the starting position
|
7
|
+
$count: 0;
|
8
|
+
%#{$prefix}column {
|
9
|
+
@include structure-common($columns, $gutter, $padding, true);
|
10
|
+
}
|
11
|
+
|
12
|
+
|
13
|
+
// This function now labels object prefix+span.location
|
14
|
+
@for $i from 1 through column-count($columns) {
|
15
|
+
@for $n from 1 through (column-count($columns) - $count) {
|
16
|
+
#{$selector}#{$prefix}#{$n}-#{$count + 1} {
|
17
|
+
|
18
|
+
@extend %#{$prefix}column;
|
19
|
+
|
20
|
+
@include structure-section($n, $count + 1, $columns, $gutter, $padding, true);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
$count: $count + 1;
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// Converted old Gridset into Grid Span.
|
2
|
+
@mixin grid-span($span, $location, $columns: false, $gutter-span: false, $padding-span: false, $output: $output) {
|
3
|
+
|
4
|
+
$columns: find-grid($columns);
|
5
|
+
$gutter-span: find-gutter($gutter-span);
|
6
|
+
$padding-span: find-padding($padding-span);
|
7
|
+
|
8
|
+
@include grid-build($span, $location, $columns, $gutter-span, $padding-span, $output);
|
9
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
//////////////////////////////
|
2
|
+
// Mixins to push/pull along the grid
|
3
|
+
//////////////////////////////
|
4
|
+
|
5
|
+
// Push
|
6
|
+
@mixin push($span, $location, $grid: false, $gutter: false) {
|
7
|
+
$columns: find-grid($grid);
|
8
|
+
$gutter: find-gutter($gutter);
|
9
|
+
|
10
|
+
@if $dir == ltr or $dir == both {
|
11
|
+
margin-left: grid-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns);
|
12
|
+
}
|
13
|
+
@else if $dir == rtl {
|
14
|
+
margin-right: grid-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns);
|
15
|
+
}
|
16
|
+
|
17
|
+
@if $dir == both {
|
18
|
+
#{$rtl-selector} & {
|
19
|
+
margin-right: grid-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
// Pull
|
25
|
+
@mixin pull($span, $location, $grid: false, $gutter: false) {
|
26
|
+
$columns: find-grid($grid);
|
27
|
+
$gutter: find-gutter($gutter);
|
28
|
+
|
29
|
+
@if $dir == ltr or $dir == both {
|
30
|
+
margin-left: (grid-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns)) * -1;
|
31
|
+
}
|
32
|
+
@else if $dir == rtl {
|
33
|
+
margin-right: (grid-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns)) * -1;
|
34
|
+
}
|
35
|
+
|
36
|
+
@if $dir == both {
|
37
|
+
#{$rtl-selector} & {
|
38
|
+
margin-right: (grid-span($span, $location, $columns, $gutter) + gutter-span($gutter, $columns)) * -1;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 17
|
9
|
+
version: 0.0.17
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Scott Kellum
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-11-05 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -90,19 +90,29 @@ files:
|
|
90
90
|
- stylesheets/singularitygs/_background-grid.scss
|
91
91
|
- stylesheets/singularitygs/_column.scss
|
92
92
|
- stylesheets/singularitygs/_grid-plugins.scss
|
93
|
-
- stylesheets/singularitygs/_grid-structure.scss
|
94
93
|
- stylesheets/singularitygs/_grid-test.scss
|
95
94
|
- stylesheets/singularitygs/_grid.scss
|
96
|
-
- stylesheets/singularitygs/_gridsets.scss
|
97
95
|
- stylesheets/singularitygs/_gutter.scss
|
98
96
|
- stylesheets/singularitygs/_helpers.scss
|
99
97
|
- stylesheets/singularitygs/_mixins.scss
|
100
98
|
- stylesheets/singularitygs/grid-plugins/_compound.scss
|
101
99
|
- stylesheets/singularitygs/grid-plugins/_ratio-spiral.scss
|
102
100
|
- stylesheets/singularitygs/grid-plugins/_ratio.scss
|
103
|
-
- stylesheets/singularitygs/grid-structure/
|
104
|
-
- stylesheets/singularitygs/grid-structure/
|
105
|
-
- stylesheets/singularitygs/grid-structure/
|
101
|
+
- stylesheets/singularitygs/grid-structure/_display-table.scss
|
102
|
+
- stylesheets/singularitygs/grid-structure/_flexbox.scss
|
103
|
+
- stylesheets/singularitygs/grid-structure/_float.scss
|
104
|
+
- stylesheets/singularitygs/grid-structure/_grid-layout.scss
|
105
|
+
- stylesheets/singularitygs/grid-structure/_isolation.scss
|
106
|
+
- stylesheets/singularitygs/helpers/_grids.scss
|
107
|
+
- stylesheets/singularitygs/helpers/_gridsets.scss
|
108
|
+
- stylesheets/singularitygs/helpers/_lists.scss
|
109
|
+
- stylesheets/singularitygs/mixins/_base-font-size.scss
|
110
|
+
- stylesheets/singularitygs/mixins/_container.scss
|
111
|
+
- stylesheets/singularitygs/mixins/_grid-build.scss
|
112
|
+
- stylesheets/singularitygs/mixins/_grid-objects.scss
|
113
|
+
- stylesheets/singularitygs/mixins/_grid-padding.scss
|
114
|
+
- stylesheets/singularitygs/mixins/_grid-span.scss
|
115
|
+
- stylesheets/singularitygs/mixins/_push-pull.scss
|
106
116
|
- templates/project/behaviors/box-sizing/boxsizing.htc
|
107
117
|
- templates/project/behaviors/box-sizing/boxsizing.php
|
108
118
|
- templates/project/manifest.rb
|