singularitygs 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,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
- }