singularitygs 1.0.alpha.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/lib/singularitygs.rb +2 -3
  2. data/stylesheets/_singularitygs.scss +45 -56
  3. data/stylesheets/singularitygs/_api.scss +39 -0
  4. data/stylesheets/singularitygs/_grids.scss +2 -0
  5. data/stylesheets/singularitygs/_gutters.scss +2 -0
  6. data/stylesheets/singularitygs/_helpers.scss +15 -3
  7. data/stylesheets/singularitygs/_language.scss +3 -0
  8. data/stylesheets/singularitygs/_math.scss +3 -0
  9. data/stylesheets/singularitygs/api/_float.scss +93 -0
  10. data/stylesheets/singularitygs/api/_isolation.scss +48 -0
  11. data/stylesheets/singularitygs/grids/_add.scss +10 -0
  12. data/stylesheets/singularitygs/grids/_find.scss +17 -0
  13. data/stylesheets/singularitygs/gutters/_add.scss +10 -0
  14. data/stylesheets/singularitygs/gutters/_find.scss +17 -0
  15. data/stylesheets/singularitygs/helpers/_background-grid.scss +186 -0
  16. data/stylesheets/singularitygs/helpers/_box-sizing.scss +25 -0
  17. data/stylesheets/singularitygs/helpers/_clearfix.scss +51 -0
  18. data/stylesheets/singularitygs/helpers/_columns.scss +15 -0
  19. data/stylesheets/singularitygs/helpers/_directions.scss +37 -0
  20. data/stylesheets/singularitygs/helpers/_find.scss +75 -0
  21. data/stylesheets/singularitygs/helpers/_sass-lists.scss +71 -0
  22. data/stylesheets/singularitygs/helpers/_span-shared.scss +9 -0
  23. data/stylesheets/singularitygs/language/_parse-add.scss +19 -0
  24. data/stylesheets/singularitygs/language/_parse-list.scss +53 -0
  25. data/stylesheets/singularitygs/language/_span.scss +20 -0
  26. data/stylesheets/singularitygs/math/_columns.scss +70 -0
  27. data/stylesheets/singularitygs/math/_context.scss +3 -0
  28. data/stylesheets/singularitygs/math/_gutters.scss +11 -0
  29. data/templates/{project → box-sizing}/behaviors/box-sizing/boxsizing.htc +0 -0
  30. data/templates/{project → box-sizing}/behaviors/box-sizing/boxsizing.php +0 -0
  31. data/templates/box-sizing/manifest.rb +4 -0
  32. data/templates/project/grid.js +16 -0
  33. data/templates/project/grid.min.js +2 -0
  34. data/templates/project/manifest.rb +21 -2
  35. data/templates/project/partials/_base.scss +4 -0
  36. data/templates/project/style.scss +15 -0
  37. metadata +39 -52
  38. data/stylesheets/singularitygs/_background-grid.scss +0 -49
  39. data/stylesheets/singularitygs/_column.scss +0 -51
  40. data/stylesheets/singularitygs/_grid-plugins.scss +0 -4
  41. data/stylesheets/singularitygs/_grid-structure.scss +0 -14
  42. data/stylesheets/singularitygs/_grid-test.scss +0 -58
  43. data/stylesheets/singularitygs/_grid.scss +0 -6
  44. data/stylesheets/singularitygs/_gutter.scss +0 -45
  45. data/stylesheets/singularitygs/_mixins.scss +0 -7
  46. data/stylesheets/singularitygs/grid-plugins/_compound.scss +0 -49
  47. data/stylesheets/singularitygs/grid-plugins/_gridset.scss +0 -16
  48. data/stylesheets/singularitygs/grid-plugins/_ratio-spiral.scss +0 -42
  49. data/stylesheets/singularitygs/grid-plugins/_ratio.scss +0 -24
  50. data/stylesheets/singularitygs/grid-structure/_display-table.scss +0 -1
  51. data/stylesheets/singularitygs/grid-structure/_flexbox.scss +0 -0
  52. data/stylesheets/singularitygs/grid-structure/_float.scss +0 -98
  53. data/stylesheets/singularitygs/grid-structure/_grid-layout.scss +0 -1
  54. data/stylesheets/singularitygs/grid-structure/_isolation.scss +0 -154
  55. data/stylesheets/singularitygs/helpers/_alphabet.scss +0 -1
  56. data/stylesheets/singularitygs/helpers/_grids.scss +0 -34
  57. data/stylesheets/singularitygs/helpers/_gridsets.scss +0 -388
  58. data/stylesheets/singularitygs/helpers/_lists.scss +0 -29
  59. data/stylesheets/singularitygs/mixins/_base-font-size.scss +0 -63
  60. data/stylesheets/singularitygs/mixins/_container.scss +0 -63
  61. data/stylesheets/singularitygs/mixins/_grid-build.scss +0 -9
  62. data/stylesheets/singularitygs/mixins/_grid-objects.scss +0 -28
  63. data/stylesheets/singularitygs/mixins/_grid-padding.scss +0 -8
  64. data/stylesheets/singularitygs/mixins/_grid-span.scss +0 -34
  65. data/stylesheets/singularitygs/mixins/_push-pull.scss +0 -41
@@ -1,388 +0,0 @@
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, $span: false, $location: false, $columns: false) {
233
- $length: length($grids);
234
-
235
- @if $user-padding != false {
236
- @return $user-padding;
237
- }
238
-
239
- @if ($span and $location and $columns) {
240
- @if type-of($columns) == list {
241
- $padding-left: false;
242
- $padding-right: false;
243
-
244
- @if type-of(nth($columns, $location)) == 'list' {
245
- $padding-left: nth(nth($columns, $location), 2);
246
- }
247
-
248
- @if type-of(nth($columns, $location + $span - 1)) == 'list' {
249
- $padding-right: nth(nth($columns, $location + $span - 1), 2);
250
- }
251
-
252
- @if $padding-left and $padding-right {
253
- $padding: join($padding-left, $padding-right);
254
- }
255
- @else if $padding-left {
256
- @return $padding-left;
257
- }
258
- @else if $padding-right {
259
- @return $padding-right;
260
- }
261
- }
262
- }
263
-
264
- @if $length > 0 {
265
- $query-min: breakpoint-get-context('min-width');
266
- $query-max: breakpoint-get-context('max-width');
267
-
268
- @if $query-min {
269
- $query-min: breakpoint-to-base-em($query-min);
270
- }
271
- @if $query-max {
272
- $query-max: breakpoint-to-base-em($query-max);
273
- }
274
-
275
- $ghr: () !default;
276
- $phs: () !default;
277
- $padding-length: length($paddings);
278
-
279
- @if $query-min or $query-max {
280
- @for $j from 2 through $length {
281
- $ghr: append($ghr, nth($grids, $j), comma);
282
-
283
- @if $padding-length == 0 {
284
- $phs: append($phs, $padding);
285
- }
286
- @else if $j > $padding-length {
287
- $phs: append($phs, nth($paddings, $padding-length));
288
- }
289
- @else {
290
- $phs: append($phs, nth($paddings, $j));
291
- }
292
- }
293
-
294
- $ghr: reverse($ghr);
295
- $phr: reverse($phs);
296
-
297
- $holder-length: length($ghr);
298
-
299
- @for $i from 1 through $holder-length {
300
- $gridholder: nth($ghr, $i);
301
-
302
- $grid-columns: nth($gridholder, 1);
303
- $grid-query: nth($gridholder, 2);
304
-
305
- $grid-query: breakpoint-to-base-em($grid-query);
306
-
307
- @if length($gridholder) < 2 {
308
- @warn 'Grid #{$gridholder} needs a breakpoint value!';
309
- }
310
- @else if $grids-mobile-first {
311
- @if $query-min and not $query-max {
312
- @if $query-min and $query-max {
313
- @if $query-min >= $grid-query and $query-max < $grid-query {
314
- @if $padding-length > 0 {
315
- @return nth($phr, $i);
316
- }
317
- @else {
318
- @return $padding;
319
- }
320
- }
321
- }
322
- @else if $query-min >= $grid-query {
323
- @if $padding-length > 0 {
324
- @return nth($phr, $i);
325
- }
326
- @else {
327
- @return $padding;
328
- }
329
- }
330
- }
331
- @else {
332
- @if $query-max < $grid-query {
333
- @if $padding-length > 0 {
334
- @return nth($phr, $i);
335
- }
336
- @else {
337
- @return $padding;
338
- }
339
- }
340
- }
341
- }
342
- @else {
343
- @if $query-min and $query-max {
344
- @if $query-min > $grid-query and $query-max <= $grid-query {
345
- @if $padding-length > 0 {
346
- @return nth($phr, $i);
347
- }
348
- @else {
349
- @return $padding;
350
- }
351
- }
352
- }
353
- @else if $query-min and not $query-max {
354
- @if $query-min > $grid-query {
355
- @if $padding-length > 0 {
356
- $padding-span: nth($phr, $i);
357
- }
358
- @else {
359
- $padding-span: $padding;
360
- }
361
- }
362
- }
363
- @else {
364
- @if $query-max <= $grid-query {
365
- @if $padding-length > 0 {
366
- $padding-span: nth($phr, $i);
367
- }
368
- @else {
369
- $padding-span: $padding;
370
- }
371
- }
372
- }
373
- }
374
- }
375
- }
376
- @else {
377
- @if length($paddings) > 0 {
378
- @return nth($paddings, 1);
379
- }
380
- @else {
381
- @return $padding;
382
- }
383
- }
384
- }
385
- @else {
386
- @return $padding;
387
- }
388
- }
@@ -1,29 +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
- // 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
- }
@@ -1,63 +0,0 @@
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
- }