singularitygs 0.0.17 → 0.1.alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. data/lib/singularitygs.rb +2 -2
  2. data/stylesheets/singularitygs.sass +40 -0
  3. data/stylesheets/singularitygs/_background-grid.sass +19 -0
  4. data/stylesheets/singularitygs/_column.sass +25 -0
  5. data/stylesheets/singularitygs/_grid-plugins.sass +2 -0
  6. data/stylesheets/singularitygs/{_grid-test.scss → _grid-test.sass} +13 -22
  7. data/stylesheets/singularitygs/_grid.sass +2 -0
  8. data/stylesheets/singularitygs/_gridsets.scss +242 -0
  9. data/stylesheets/singularitygs/_gutter.sass +4 -0
  10. data/stylesheets/singularitygs/_helpers.sass +37 -0
  11. data/stylesheets/singularitygs/_mixins.sass +75 -0
  12. data/stylesheets/singularitygs/grid-plugins/_compound.sass +30 -0
  13. data/stylesheets/singularitygs/grid-plugins/_ratio.scss +0 -4
  14. metadata +24 -40
  15. data/stylesheets/_singularitygs.scss +0 -68
  16. data/stylesheets/singularitygs/_background-grid.scss +0 -26
  17. data/stylesheets/singularitygs/_column.scss +0 -51
  18. data/stylesheets/singularitygs/_grid-plugins.scss +0 -3
  19. data/stylesheets/singularitygs/_grid.scss +0 -3
  20. data/stylesheets/singularitygs/_gutter.scss +0 -45
  21. data/stylesheets/singularitygs/_helpers.scss +0 -3
  22. data/stylesheets/singularitygs/_mixins.scss +0 -7
  23. data/stylesheets/singularitygs/grid-plugins/_compound.scss +0 -49
  24. data/stylesheets/singularitygs/grid-plugins/_ratio-spiral.scss +0 -42
  25. data/stylesheets/singularitygs/grid-structure/_display-table.scss +0 -1
  26. data/stylesheets/singularitygs/grid-structure/_flexbox.scss +0 -0
  27. data/stylesheets/singularitygs/grid-structure/_float.scss +0 -94
  28. data/stylesheets/singularitygs/grid-structure/_grid-layout.scss +0 -1
  29. data/stylesheets/singularitygs/grid-structure/_isolation.scss +0 -145
  30. data/stylesheets/singularitygs/helpers/_grids.scss +0 -34
  31. data/stylesheets/singularitygs/helpers/_gridsets.scss +0 -362
  32. data/stylesheets/singularitygs/helpers/_lists.scss +0 -29
  33. data/stylesheets/singularitygs/mixins/_base-font-size.scss +0 -63
  34. data/stylesheets/singularitygs/mixins/_container.scss +0 -63
  35. data/stylesheets/singularitygs/mixins/_grid-build.scss +0 -16
  36. data/stylesheets/singularitygs/mixins/_grid-objects.scss +0 -26
  37. data/stylesheets/singularitygs/mixins/_grid-padding.scss +0 -8
  38. data/stylesheets/singularitygs/mixins/_grid-span.scss +0 -9
  39. data/stylesheets/singularitygs/mixins/_push-pull.scss +0 -41
  40. data/templates/project/behaviors/box-sizing/boxsizing.htc +0 -399
  41. data/templates/project/behaviors/box-sizing/boxsizing.php +0 -23
  42. data/templates/project/manifest.rb +0 -4
@@ -1,94 +0,0 @@
1
- @mixin float-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 float-common($columns: $columns, $gutter: $gutter, $padding: $padding, $grouped-styles: $grouped-styles) {
16
- @include box-sizing(border-box);
17
- *behavior: url("../behaviors/box-sizing/boxsizing.php");
18
- overflow: hidden;
19
- *zoom: 1;
20
-
21
- @if $grouped-styles and $padding != 0 {
22
- padding-left: $padding;
23
- padding-right: $padding;
24
- }
25
- @if $grouped-styles == false and $padding != 0 {
26
-
27
- }
28
- }
29
-
30
-
31
-
32
- @mixin float-section($span, $location: $grid-counter, $columns: $columns, $gutter: $gutter, $padding: $padding, $grouped-styles: $grouped-styles) {
33
- width: grid-span($span, $location, $columns, $gutter);
34
- // add special left padding
35
- @include grid-location($span, $location, $columns);
36
-
37
- @if $dir == ltr or $dir == both {
38
- @if $grid-location == 'middle' or $grid-location == 'first'{
39
- float: left;
40
- margin-right: gutter-span($gutter, $columns);
41
- }
42
- @else if $grid-location == 'last' {
43
- float: right;
44
- }
45
- @include float-clear('left');
46
- }
47
- @if $dir == rtl {
48
- @if $grid-location == 'middle' or $grid-location == 'first' {
49
- float: right;
50
- margin-left: gutter-span($gutter, $columns);
51
- }
52
- @else if $grid-location == 'last' {
53
- float: left;
54
- }
55
- @include float-clear('right');
56
- }
57
- @if $dir == both {
58
- #{$rtl-selector} & {
59
- @if $grid-location == 'middle' or $grid-location == 'first' {
60
- float: right;
61
- margin-left: gutter-span($gutter, $columns);
62
- }
63
- @else if $grid-location == 'last' {
64
- float: left;
65
- }
66
- @include float-clear('right');
67
- }
68
- }
69
-
70
- // Padding
71
- @if type-of($columns) == list {
72
- @if type-of(nth($columns, $location)) == list {
73
- padding-left: nth(nth($columns, $location), 2);
74
- }
75
- @else if $padding != 0 {
76
- padding-left: $padding;
77
- }
78
- // add special right padding
79
- @if type-of(nth($columns, $location + $span - 1)) == list {
80
- padding-right: nth(nth($columns, $location + $span - 1), 2);
81
- }
82
- @else if $padding != 0 {
83
- padding-right: $padding;
84
- }
85
- }
86
- }
87
-
88
- @mixin float-structure($span, $location, $columns, $gutter, $padding) {
89
- // common components
90
- @include float-common($columns, $gutter);
91
-
92
- // specific styles
93
- @include float-section($span, $location, $columns, $gutter);
94
- }
@@ -1,145 +0,0 @@
1
- @mixin isolation-clear($dir) {
2
- @if $dir == 'left' {
3
- clear: right;
4
- @if $grouped-styles {
5
- margin-right: -100%;
6
- float: left;
7
- }
8
- }
9
- @else if $dir == 'right' {
10
- clear: left;
11
- @if $grouped-styles {
12
- margin-left: -100%;
13
- float: right;
14
- }
15
- }
16
- @else if $dir == 'both' {
17
- clear: both;
18
- @if $grouped-styles {
19
- margin-right: -100%;
20
- float: left;
21
- }
22
- }
23
-
24
- @include clearfix;
25
- }
26
-
27
- @mixin isolation-common($columns: $columns, $gutter: $gutter, $padding: $padding, $grouped-styles: $grouped-styles) {
28
- @include box-sizing(border-box);
29
- *behavior: url("../behaviors/box-sizing/boxsizing.php");
30
- overflow: hidden;
31
- *zoom: 1;
32
-
33
- @if $grouped-styles and $padding != 0 {
34
- padding-left: $padding;
35
- padding-right: $padding;
36
- }
37
- @if $grouped-styles == false and $padding != 0 {
38
-
39
- }
40
- }
41
-
42
-
43
-
44
- @mixin isolation-section($span, $location: $grid-counter, $columns: $columns, $gutter: $gutter, $padding: $padding, $grouped-styles: $grouped-styles) {
45
- width: grid-span($span, $location, $columns, $gutter);
46
- // add special left padding
47
-
48
- @include grid-location($span, $location, $columns);
49
-
50
- @if $dir == ltr or $dir == both {
51
- @if $grid-location == 'middle' {
52
- @if $grouped-styles == false {
53
- margin-right: -100%;
54
- float: left;
55
- @include isolation-clear('left');
56
- }
57
- }
58
- @else if $grid-location == 'first' {
59
- @if $grouped-styles == false {
60
- margin-right: -100%;
61
- float: left;
62
- @include isolation-clear('left');
63
- }
64
- margin-left: 0;
65
- }
66
- @else if $grid-location == 'last' {
67
- float: right;
68
- margin-right: 0;
69
- @include isolation-clear('left');
70
- }
71
- }
72
- @if $dir == rtl {
73
- @if $grid-location == 'middle' {
74
- @if $grouped-styles == false {
75
- margin-left: -100%;
76
- float: right;
77
- @include isolation-clear('right');
78
- }
79
- }
80
- @else if grid-location == 'first' {
81
- @if $grouped-styles {
82
- margin-left: -100%;
83
- float: right;
84
- @include isolation-clear('right');
85
- }
86
- margin-right: 0;
87
- }
88
- @else if $grid-location == 'last' {
89
- float: left;
90
- margin-left: 0;
91
- @include isolation-clear('right');
92
- }
93
- }
94
- @if $dir == both {
95
- #{$rtl-selector} & {
96
- @if $grid-location == 'middle' {
97
- @if $grouped-styles {
98
- margin-left: -100%;
99
- float: right;
100
- @include isolation-clear('right');
101
- }
102
- }
103
- @if $grid-location == 'first' {
104
- @if $grouped-styles {
105
- margin-left: -100%;
106
- float: right;
107
- @include isolation-clear('right');
108
- }
109
- margin-right: 0;
110
- }
111
- @if $grid-location == 'last' {
112
- float: left;
113
- margin-left: 0;
114
- @include isolation-clear('right');
115
- }
116
- }
117
- }
118
-
119
- @include push($location - 1, 1, $columns, $gutter);
120
-
121
- // Padding
122
- @if type-of($columns) == list {
123
- @if type-of(nth($columns, $location)) == list {
124
- padding-left: nth(nth($columns, $location), 2);
125
- }
126
- @else if $padding != 0 {
127
- padding-left: $padding;
128
- }
129
- // add special right padding
130
- @if type-of(nth($columns, $location + $span - 1)) == list {
131
- padding-right: nth(nth($columns, $location + $span - 1), 2);
132
- }
133
- @else if $padding != 0 {
134
- padding-right: $padding;
135
- }
136
- }
137
- }
138
-
139
- @mixin isolation-structure($span, $location, $columns, $gutter, $padding) {
140
- // common components
141
- @include isolation-common($columns, $gutter);
142
-
143
- // specific styles
144
- @include isolation-section($span, $location, $columns, $gutter);
145
- }
@@ -1,34 +0,0 @@
1
- // Find column count
2
- @function column-count($columns) {
3
- @if type-of($columns) == number {
4
- @return $columns;
5
- }
6
- @if type-of($columns) == list {
7
- @return length($columns);
8
- }
9
- }
10
-
11
- // Context of gutters
12
- @function gutter-context($gutter, $context) {
13
- @return $gutter * 100% / $context;
14
- }
15
-
16
- // First or last column?
17
- $grid-location: '';
18
-
19
- @mixin grid-location($span, $location, $columns) {
20
- $grid-location: '';
21
-
22
- @if ($span + $location) > column-count($columns) {
23
- $grid-location: 'last';
24
- }
25
- @else if $location == 1 {
26
- $grid-location: 'first';
27
- }
28
- @else if $location == column-count($columns) {
29
- $grid-location: 'last';
30
- }
31
- @else {
32
- $grid-location: 'middle';
33
- }
34
- }
@@ -1,362 +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) {
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
- }