flint-gs 2.0.6 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -11
- data/lib/flint/version.rb +1 -1
- data/stylesheets/_flint.scss +3 -3
- data/stylesheets/flint/config/_config.scss +24 -24
- data/stylesheets/flint/functions/_functions.scss +9 -9
- data/stylesheets/flint/functions/helpers/_helpers.scss +138 -138
- data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +13 -13
- data/stylesheets/flint/functions/lib/_calc-width.scss +17 -17
- data/stylesheets/flint/functions/lib/_exists.scss +12 -12
- data/stylesheets/flint/functions/lib/_fluid-width.scss +12 -12
- data/stylesheets/flint/functions/lib/_get-index.scss +11 -11
- data/stylesheets/flint/functions/lib/_get-instance-value.scss +12 -12
- data/stylesheets/flint/functions/lib/_get-value.scss +11 -11
- data/stylesheets/flint/functions/lib/_has-family-instance.scss +12 -12
- data/stylesheets/flint/functions/lib/_instance.scss +17 -17
- data/stylesheets/flint/functions/lib/_last.scss +11 -11
- data/stylesheets/flint/functions/lib/_list-to-string.scss +15 -15
- data/stylesheets/flint/functions/lib/_map-fetch.scss +12 -12
- data/stylesheets/flint/functions/lib/_next-index.scss +11 -11
- data/stylesheets/flint/functions/lib/_purge.scss +13 -13
- data/stylesheets/flint/functions/lib/_remove.scss +15 -15
- data/stylesheets/flint/functions/lib/_replace-substring.scss +13 -13
- data/stylesheets/flint/functions/lib/_replace.scss +15 -15
- data/stylesheets/flint/functions/lib/_steal-key.scss +11 -11
- data/stylesheets/flint/functions/lib/_steal-values.scss +12 -12
- data/stylesheets/flint/functions/lib/_string-to-list.scss +13 -13
- data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +11 -11
- data/stylesheets/flint/functions/lib/_support-syntax.scss +12 -12
- data/stylesheets/flint/functions/lib/_types-in-list.scss +13 -13
- data/stylesheets/flint/functions/lib/_use-syntax.scss +11 -11
- data/stylesheets/flint/globals/_globals.scss +80 -80
- data/stylesheets/flint/mixins/_mixins.scss +3 -3
- data/stylesheets/flint/mixins/lib/_box-sizing.scss +11 -11
- data/stylesheets/flint/mixins/lib/_calculate.scss +45 -45
- data/stylesheets/flint/mixins/lib/_clearfix.scss +11 -11
- data/stylesheets/flint/mixins/lib/_container.scss +10 -10
- data/stylesheets/flint/mixins/lib/_main.scss +511 -511
- data/stylesheets/flint/mixins/lib/_new-instance.scss +15 -15
- data/stylesheets/flint/mixins/lib/_print-instance.scss +17 -17
- data/tests/bootcamp/_bootcamp.scss +0 -0
- data/tests/bootcamp/bootcamp.coffee +101 -0
- data/tests/bootcamp/core/functions/_actual.scss +0 -0
- data/tests/bootcamp/core/functions/_error.scss +0 -0
- data/tests/bootcamp/core/functions/_expect.scss +0 -0
- data/tests/bootcamp/core/functions/_not-to.scss +0 -0
- data/tests/bootcamp/core/functions/_should.scss +0 -0
- data/tests/bootcamp/core/functions/_to.scss +0 -0
- data/tests/bootcamp/core/mixins/_describe.scss +0 -0
- data/tests/bootcamp/core/mixins/_it.scss +0 -0
- data/tests/bootcamp/core/mixins/_runner.scss +0 -0
- data/tests/bootcamp/core/mixins/_should.scss +0 -0
- data/tests/bootcamp/core/mixins/_xdescribe.scss +0 -0
- data/tests/bootcamp/core/mixins/_xit.scss +0 -0
- data/tests/bootcamp/core/variables/_helpers.scss +0 -0
- data/tests/bootcamp/core/variables/_settings.scss +0 -0
- data/tests/bootcamp/core/variables/_should.scss +0 -0
- data/tests/bootcamp/core/variables/_trackers.scss +0 -0
- data/tests/bootcamp/lib/_sassyjson.scss +0 -0
- data/tests/bootcamp/matchers/_be.scss +0 -0
- data/tests/bootcamp/matchers/_equal.scss +0 -0
- data/tests/bootcamp/matchers/lists/_be-empty.scss +0 -0
- data/tests/bootcamp/matchers/lists/_be-longer-than.scss +0 -0
- data/tests/bootcamp/matchers/lists/_be-shorter-than.scss +0 -0
- data/tests/bootcamp/matchers/lists/_contain.scss +0 -0
- data/tests/bootcamp/matchers/lists/_deep-contain.scss +0 -0
- data/tests/bootcamp/matchers/lists/_deep-equal.scss +0 -0
- data/tests/bootcamp/matchers/lists/_have-length-of.scss +0 -0
- data/tests/bootcamp/matchers/numbers/_be-close-to.scss +0 -0
- data/tests/bootcamp/matchers/numbers/_be-greater-than.scss +0 -0
- data/tests/bootcamp/matchers/numbers/_be-less-than.scss +0 -0
- data/tests/bootcamp/matchers/types/_be-falsy.scss +0 -0
- data/tests/bootcamp/matchers/types/_be-null.scss +0 -0
- data/tests/bootcamp/matchers/types/_be-truthy.scss +0 -0
- data/tests/bootcamp/matchers/types/_have-type-of.scss +0 -0
- data/tests/bootcamp/utils/_contain.scss +0 -0
- data/tests/bootcamp/utils/_equal.scss +0 -0
- data/tests/bootcamp/utils/_list-join.scss +0 -0
- data/tests/bootcamp/utils/_power.scss +0 -0
- data/tests/input/functions/_functions.scss +9 -9
- data/tests/input/functions/helpers/_helpers.scss +45 -45
- data/tests/input/functions/lib/_calc-breakpoint.scss +3 -3
- data/tests/input/functions/lib/_calc-width.scss +3 -3
- data/tests/input/functions/lib/_exists.scss +3 -3
- data/tests/input/functions/lib/_fluid-width.scss +3 -3
- data/tests/input/functions/lib/_get-index.scss +3 -3
- data/tests/input/functions/lib/_get-instance-value.scss +3 -3
- data/tests/input/functions/lib/_get-value.scss +3 -3
- data/tests/input/functions/lib/_has-family-instance.scss +3 -3
- data/tests/input/functions/lib/_instance.scss +3 -3
- data/tests/input/functions/lib/_last.scss +3 -3
- data/tests/input/functions/lib/_list-to-string.scss +3 -3
- data/tests/input/functions/lib/_map-fetch.scss +3 -3
- data/tests/input/functions/lib/_next-index.scss +3 -3
- data/tests/input/functions/lib/_purge.scss +3 -3
- data/tests/input/functions/lib/_remove.scss +3 -3
- data/tests/input/functions/lib/_replace-substring.scss +3 -3
- data/tests/input/functions/lib/_replace.scss +3 -3
- data/tests/input/functions/lib/_steal-key.scss +3 -3
- data/tests/input/functions/lib/_steal-values.scss +3 -3
- data/tests/input/functions/lib/_string-to-list.scss +3 -3
- data/tests/input/functions/lib/_support-syntax-bem.scss +3 -3
- data/tests/input/functions/lib/_support-syntax.scss +3 -3
- data/tests/input/functions/lib/_types-in-list.scss +3 -3
- data/tests/input/functions/lib/_use-syntax.scss +3 -3
- data/tests/input/output.scss +22 -22
- metadata +4 -2
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
///
|
2
|
+
/// Box sizing
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {String} $type ("border-box") - border-box type
|
7
|
+
///
|
8
|
+
/// @requires {Mixin} box-sizing - local mixin if available
|
9
|
+
///
|
10
|
+
/// @group Internal Mixins
|
11
|
+
///
|
12
12
|
@mixin flint-box-sizing($type: "border-box") {
|
13
13
|
@if mixin-exists("box-sizing") {
|
14
14
|
@include box-sizing($type);
|
@@ -1,16 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
////
|
2
|
+
/// @group Internal Mixins
|
3
|
+
////
|
4
|
+
|
5
|
+
///
|
6
|
+
/// Outputs calculated styles
|
7
|
+
///
|
8
|
+
/// @access private
|
9
|
+
///
|
10
|
+
/// @param {Map} $width - map of target / context values
|
11
|
+
/// @param {Number} $margin-right - right margin value
|
12
|
+
/// @param {Number} $margin-left - left margin value
|
13
|
+
///
|
14
14
|
@mixin flint-output($width, $margin-right, $margin-left) {
|
15
15
|
|
16
16
|
@if not flint-is-map($width) {
|
@@ -32,17 +32,17 @@
|
|
32
32
|
@content;
|
33
33
|
}
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
35
|
+
///
|
36
|
+
/// Calculate widths, save all variables to instance
|
37
|
+
///
|
38
|
+
/// @access private
|
39
|
+
///
|
40
|
+
/// @param {String} $calc-key - breakpoint key
|
41
|
+
/// @param {Number} $calc-span - span value
|
42
|
+
/// @param {Number} $calc-context - context value
|
43
|
+
/// @param {String} $calc-gutter - gutter modifier
|
44
|
+
/// @param {Number|Null} $i - index if variable length is > 1
|
45
|
+
///
|
46
46
|
@mixin flint-calculate($key, $span, $context, $gutter, $i: null) {
|
47
47
|
|
48
48
|
// Define local vars
|
@@ -62,18 +62,18 @@
|
|
62
62
|
// Default value for cache search result
|
63
63
|
$cached: false;
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
65
|
+
//
|
66
|
+
// Check lengths, if invalid throw error
|
67
|
+
//
|
68
68
|
@if flint-types-in-list($calc-gutter, "string") and length($calc-gutter) != length($flint__all-keys) {
|
69
69
|
@if not $flint__development-mode {
|
70
70
|
@error "Invalid argument length of #{length($calc-gutter)} for gutter. If you're using a shorthand, please provide an argument for each breakpoint in your config (#{length($flint__all-keys)}). Your argument was: #{$calc-gutter}";
|
71
71
|
}
|
72
72
|
}
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
|
74
|
+
//
|
75
|
+
// Check if any arguments are lists if called from loop
|
76
|
+
//
|
77
77
|
@if $i {
|
78
78
|
|
79
79
|
@if flint-types-in-list($calc-key, "number") {
|
@@ -91,9 +91,9 @@
|
|
91
91
|
|
92
92
|
}
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
//
|
95
|
+
// Check for cached results
|
96
|
+
//
|
97
97
|
@if $calc-context != "auto" and $calc-span != 0 {
|
98
98
|
@if map-has-key($flint__cache-results, "#{$calc-key, $calc-span, $calc-context, $calc-gutter, $i}") {
|
99
99
|
$result: map-get($flint__cache-results, "#{$calc-key, $calc-span, $calc-context, $calc-gutter, $i}");
|
@@ -108,9 +108,9 @@
|
|
108
108
|
}
|
109
109
|
}
|
110
110
|
|
111
|
-
|
112
|
-
|
113
|
-
|
111
|
+
//
|
112
|
+
// Hide if span is zero
|
113
|
+
//
|
114
114
|
@if $calc-span == 0 {
|
115
115
|
|
116
116
|
// First check if it's the default, so we don't hide the element on all breakpoints
|
@@ -133,16 +133,16 @@
|
|
133
133
|
|
134
134
|
} @else {
|
135
135
|
|
136
|
-
|
137
|
-
|
138
|
-
|
136
|
+
//
|
137
|
+
// Define floats if key is default, or this is a single instance call
|
138
|
+
//
|
139
139
|
@if flint-is-default($calc-key) and $gutter != "center" or $i == null and $gutter != "center" {
|
140
140
|
float: unquote(flint-get-value("settings", "float-direction"));
|
141
141
|
}
|
142
142
|
|
143
|
-
|
144
|
-
|
145
|
-
|
143
|
+
//
|
144
|
+
// Disable floats if gutter is set to center
|
145
|
+
//
|
146
146
|
$recursive-center: false;
|
147
147
|
|
148
148
|
@if $gutter == "center" {
|
@@ -162,9 +162,9 @@
|
|
162
162
|
float: none;
|
163
163
|
}
|
164
164
|
|
165
|
-
|
166
|
-
|
167
|
-
|
165
|
+
//
|
166
|
+
// Only run through if cache search was unsuccessful
|
167
|
+
//
|
168
168
|
@if not $cached {
|
169
169
|
|
170
170
|
$output-gutter: flint-get-gutter();
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
///
|
2
|
+
/// Micro flint-clearfix
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @link http://nicolasgallagher.com/micro-clearfix-hack/
|
7
|
+
///
|
8
|
+
/// @requires {Mixin} clearfix - local mixin if available
|
9
|
+
///
|
10
|
+
/// @group Internal Mixins
|
11
|
+
///
|
12
12
|
@mixin flint-clearfix {
|
13
13
|
@if mixin-exists("clearfix") {
|
14
14
|
@include clearfix;
|
@@ -1,13 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
///
|
2
|
+
/// Container
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {String} $key (null) - alias of individual breakpoint
|
7
|
+
/// @param {Number} $i (null) - index number if called from loop
|
8
|
+
///
|
9
|
+
/// @group Internal Mixins
|
10
|
+
///
|
11
11
|
@mixin flint-container($key: null, $i: null) {
|
12
12
|
|
13
13
|
// Check if inside of loop, and if so only output for default
|
@@ -1,432 +1,432 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
1
|
+
///
|
2
|
+
/// # Main API
|
3
|
+
///
|
4
|
+
/// ----
|
5
|
+
///
|
6
|
+
/// ## Shorthand
|
7
|
+
///
|
8
|
+
/// ### Recursive span
|
9
|
+
/// Use this if you want identical column spans across all breakpoints. This is of course
|
10
|
+
/// relative to each of your breakpoint's column count, so if your lowest breakpoint has
|
11
|
+
/// a column count of `4`, then anything above that would likely cause layout issues
|
12
|
+
/// for that breakpoint.
|
13
|
+
///
|
14
|
+
/// ```scss
|
15
|
+
/// div {
|
16
|
+
/// @include _(2);
|
17
|
+
/// }
|
18
|
+
/// ```
|
19
|
+
///
|
20
|
+
/// ### Recursive Span With Identical Context
|
21
|
+
/// Use this if your nested context is identical across all breakpoints. The `$context` should
|
22
|
+
/// be the span value of the element's parent, or `auto`.
|
23
|
+
///
|
24
|
+
/// ```scss
|
25
|
+
/// div {
|
26
|
+
/// @include _(4, 2);
|
27
|
+
/// }
|
28
|
+
/// ```
|
29
|
+
///
|
30
|
+
/// ### Recursive Span With Differing Context
|
31
|
+
/// Use this if your nested context is not identical across all breakpoints. The `$context`
|
32
|
+
/// should be the span value of the element's parent, or `auto`.
|
33
|
+
///
|
34
|
+
/// ```scss
|
35
|
+
/// div {
|
36
|
+
/// @include _(4, 8 8 4 4);
|
37
|
+
/// }
|
38
|
+
/// ```
|
39
|
+
///
|
40
|
+
/// ### Variable Span
|
41
|
+
/// Use this if your content needs different spans across each breakpoint. The order of
|
42
|
+
/// operations is the order that your breakpoints are listed in your config (DESC).
|
43
|
+
///
|
44
|
+
/// ```scss
|
45
|
+
/// div {
|
46
|
+
/// @include _(8 8 4 4);
|
47
|
+
/// }
|
48
|
+
/// ```
|
49
|
+
///
|
50
|
+
/// ### Variable Span With Identical Context
|
51
|
+
/// Use this if your nested context is identical across all breakpoints. The `$context`
|
52
|
+
/// should be the span value of the element's parent, or `auto`.
|
53
|
+
///
|
54
|
+
/// ```scss
|
55
|
+
/// div {
|
56
|
+
/// @include _(4 4 2 2, 4);
|
57
|
+
/// }
|
58
|
+
/// ```
|
59
|
+
///
|
60
|
+
/// ### Variable Span With Differing Context
|
61
|
+
/// Use this if your nested context is not identical across all breakpoints. The `$context`
|
62
|
+
/// should be the span value of the element's parent, or `auto`.
|
63
|
+
///
|
64
|
+
/// ```scss
|
65
|
+
/// div {
|
66
|
+
/// @include _(8 8 4 4, 8 8 4 4);
|
67
|
+
/// }
|
68
|
+
/// ```
|
69
|
+
///
|
70
|
+
/// ----
|
71
|
+
///
|
72
|
+
/// ## Longhand
|
73
|
+
///
|
74
|
+
/// ### Span
|
75
|
+
/// Use if you want to define each span by breakpoint `$alias`.
|
76
|
+
///
|
77
|
+
/// ```scss
|
78
|
+
/// div {
|
79
|
+
/// @include _(desktop, 2);
|
80
|
+
/// }
|
81
|
+
/// ```
|
82
|
+
///
|
83
|
+
/// ### Span With Context
|
84
|
+
/// Use if you want to define each span by breakpoint `$alias`. The `$context` should be the span
|
85
|
+
/// value of the element's parent, or `auto`.
|
86
|
+
///
|
87
|
+
/// ```scss
|
88
|
+
/// div {
|
89
|
+
/// @include _(desktop, 4, 2);
|
90
|
+
/// }
|
91
|
+
/// ```
|
92
|
+
///
|
93
|
+
/// ----
|
94
|
+
///
|
95
|
+
/// ## Automatic Context
|
96
|
+
///
|
97
|
+
/// You can use `$context: auto`, and Flint will calculate based on the closest parent element's
|
98
|
+
/// width instead of the current breakpoint. When using `auto`, Flint falls back from the topmost
|
99
|
+
/// selector until one is found that has an instance, and it will calculate its span based on that
|
100
|
+
/// instance's width for the current breakpoint. Think of the `auto` option as a self-correcting grid.
|
101
|
+
///
|
102
|
+
/// When utilizing the `$context` argument, be sure to note the differences in the way the calculations
|
103
|
+
/// happen depending on if you use a numerical value or `auto`. When using a numerical value, the span
|
104
|
+
/// is calculated against the current breakpoint's value (example: `80em`), then it's divided by its column
|
105
|
+
/// count (example: `16`), and then finally, it's multiplied by the passed `$context` value. When using
|
106
|
+
/// `auto`, the span is _always_ calculated against the closest parent element's width instead
|
107
|
+
/// of the current breakpoint's width.
|
108
|
+
///
|
109
|
+
/// The difference in output varies, but your gutters will be more accurate across the board if you
|
110
|
+
/// consistently use the `auto` option. This option allows you to infinitely nest elements on both fixed
|
111
|
+
/// and fluid grids without dealing with the inconsistencies that can be caused by nesting elements that
|
112
|
+
/// all use a gutter value of their own. Because the parent element's actual width is always used, the
|
113
|
+
/// gutters never become out of sync.
|
114
|
+
///
|
115
|
+
/// ```scss
|
116
|
+
/// .parent {
|
117
|
+
/// @include _(4);
|
118
|
+
/// .child {
|
119
|
+
/// @include _(3, 4);
|
120
|
+
/// }
|
121
|
+
/// }
|
122
|
+
///
|
123
|
+
/// // Auto will work
|
124
|
+
/// .parent {
|
125
|
+
/// @include _(4);
|
126
|
+
/// .child {
|
127
|
+
/// @include _(3, auto);
|
128
|
+
/// }
|
129
|
+
/// }
|
130
|
+
///
|
131
|
+
/// // Will also work
|
132
|
+
/// .parent {
|
133
|
+
/// @include _(4);
|
134
|
+
/// }
|
135
|
+
/// .parent .child {
|
136
|
+
/// @include _(3, auto);
|
137
|
+
/// }
|
138
|
+
///
|
139
|
+
/// // Will not work, as the child has no relation to
|
140
|
+
/// // the parent within the stylesheet
|
141
|
+
/// .parent {
|
142
|
+
/// @include _(6);
|
143
|
+
/// }
|
144
|
+
/// .child {
|
145
|
+
/// @include _(3, auto);
|
146
|
+
/// }
|
147
|
+
/// ```
|
148
|
+
///
|
149
|
+
/// If you attempt to use this feature with a methodology like BEM, where selectors aren't neccassarily
|
150
|
+
/// lists, but instead single strings, you'll notice that Flint can't find return a valid parent for the
|
151
|
+
/// element. This is the reason for the `support-syntax` functionality. With it, Flint is able to parse
|
152
|
+
/// selectors that are a single string, as opposed to a list, and successfully search for the passed
|
153
|
+
/// selector's parent.
|
154
|
+
///
|
155
|
+
/// ----
|
156
|
+
///
|
157
|
+
/// ## Modifiers
|
158
|
+
///
|
159
|
+
/// ### Alpha
|
160
|
+
/// Remove the left `$gutter` from the span. Other aliases for `alpha` include: `no-left` and `first`.
|
161
|
+
///
|
162
|
+
/// ```scss
|
163
|
+
/// div {
|
164
|
+
/// @include _(12 8 6 4, $gutter: alpha);
|
165
|
+
/// }
|
166
|
+
/// ```
|
167
|
+
///
|
168
|
+
/// ### Omega
|
169
|
+
/// Remove the right `$gutter` from the span. Other aliases for `omega` include: `no-right` and `last`.
|
170
|
+
///
|
171
|
+
/// ```scss
|
172
|
+
/// div {
|
173
|
+
/// @include _(2, $gutter: omega);
|
174
|
+
/// }
|
175
|
+
/// ````
|
176
|
+
///
|
177
|
+
/// ### Row
|
178
|
+
/// Remove both of the `$gutter` values from the span. Other aliases for `row` include: `none`.
|
179
|
+
///
|
180
|
+
/// ```scss
|
181
|
+
/// div {
|
182
|
+
/// @include _(4, $gutter: row);
|
183
|
+
/// }
|
184
|
+
/// ```
|
185
|
+
///
|
186
|
+
/// ### Center
|
187
|
+
/// Center the current span within it's container element. Outputs auto left and right margins.
|
188
|
+
/// This modifier will also remove any float properties on the element.
|
189
|
+
///
|
190
|
+
/// ```scss
|
191
|
+
/// div {
|
192
|
+
/// @include _(4, $gutter: center);
|
193
|
+
/// }
|
194
|
+
/// ```
|
195
|
+
///
|
196
|
+
/// ### Inside
|
197
|
+
/// Sets both `$gutter` values on the inside of the element. Instead of deducting `$gutter*2` out
|
198
|
+
/// of the final width, it will deduct `$gutter*4`. Useful for nesting elements inside of other
|
199
|
+
/// elements without using `$context: auto`.
|
200
|
+
///
|
201
|
+
/// ```scss
|
202
|
+
/// div {
|
203
|
+
/// @include _(16 12 8 4, $gutter: inside);
|
204
|
+
/// }
|
205
|
+
/// ```
|
206
|
+
///
|
207
|
+
/// ### Default
|
208
|
+
/// Argument to use the default left/right `$gutter` values. Useful for when you want to use a
|
209
|
+
/// variable `$gutter` argument. Other aliases for `default` include: `normal` and `regular`.
|
210
|
+
///
|
211
|
+
/// ```scss
|
212
|
+
/// div {
|
213
|
+
/// @include _(4, $gutter: default);
|
214
|
+
/// }
|
215
|
+
/// ```
|
216
|
+
///
|
217
|
+
/// ### Variable Modifiers
|
218
|
+
/// Instead of passing in a recursive `$gutter` value, you may specify a value for each breakpoint exactly
|
219
|
+
/// like you would a `$span` argument.
|
220
|
+
///
|
221
|
+
/// ```scss
|
222
|
+
/// div {
|
223
|
+
/// @include _(10 8 6 4, $gutter: alpha omega omega default);
|
224
|
+
/// }
|
225
|
+
/// ```
|
226
|
+
///
|
227
|
+
/// ----
|
228
|
+
///
|
229
|
+
/// ## Queries
|
230
|
+
///
|
231
|
+
/// ### By Alias
|
232
|
+
/// Use this type of query to wrap the `@content` in a single query for the specified breakpoint.
|
233
|
+
///
|
234
|
+
/// ```scss
|
235
|
+
/// div {
|
236
|
+
/// @include _(desktop) {
|
237
|
+
/// property: value;
|
238
|
+
/// }
|
239
|
+
/// }
|
240
|
+
/// ```
|
241
|
+
///
|
242
|
+
/// ### From, To
|
243
|
+
/// Use this type of query to wrap the `@content` in a single query between 2 breakpoints. Make
|
244
|
+
/// sure to pass in the breakpoints from lowest to highest.
|
245
|
+
///
|
246
|
+
/// ```scss
|
247
|
+
/// div {
|
248
|
+
/// @include _(from tablet to laptop) {
|
249
|
+
/// property: value;
|
250
|
+
/// }
|
251
|
+
/// }
|
252
|
+
/// ```
|
253
|
+
///
|
254
|
+
/// ### Greater Than
|
255
|
+
/// Use this type of query to wrap the `@content` in a single query for anything above
|
256
|
+
/// the passed breakpoint.
|
257
|
+
///
|
258
|
+
/// ```scss
|
259
|
+
/// div {
|
260
|
+
/// @include _(greater than laptop) {
|
261
|
+
/// property: value;
|
262
|
+
/// }
|
263
|
+
/// @include _(5em greater than tablet) {
|
264
|
+
/// property: value;
|
265
|
+
/// }
|
266
|
+
/// @include _(greater than 55em) {
|
267
|
+
/// property: value;
|
268
|
+
/// }
|
269
|
+
/// }
|
270
|
+
/// ```
|
271
|
+
///
|
272
|
+
/// ### Less Than
|
273
|
+
/// Use this type of query to wrap the `@content` in a single query for anything below
|
274
|
+
/// the passed breakpoint.
|
275
|
+
///
|
276
|
+
/// ```scss
|
277
|
+
/// div {
|
278
|
+
/// @include _(less than laptop) {
|
279
|
+
/// property: value;
|
280
|
+
/// }
|
281
|
+
/// @include _(5em less than tablet) {
|
282
|
+
/// property: value;
|
283
|
+
/// }
|
284
|
+
/// @include _(less than 8em) {
|
285
|
+
/// property: value;
|
286
|
+
/// }
|
287
|
+
/// }
|
288
|
+
/// ```
|
289
|
+
///
|
290
|
+
/// ### For
|
291
|
+
/// Use this type of query to wrap the `@content` in a single comma delimited query
|
292
|
+
/// for each passed `$alias`.
|
293
|
+
///
|
294
|
+
/// ```scss
|
295
|
+
/// div {
|
296
|
+
/// @include _(for mobile tablet desktop) {
|
297
|
+
/// property: value;
|
298
|
+
/// }
|
299
|
+
/// }
|
300
|
+
/// ```
|
301
|
+
///
|
302
|
+
/// ----
|
303
|
+
///
|
304
|
+
/// ## Miscellaneous
|
305
|
+
///
|
306
|
+
/// ### Clearfix
|
307
|
+
/// Given that Flint is float based, you might find yourself needing to use a clearfix. Flint comes
|
308
|
+
/// packaged with a micro-clearfix function. _Flint will attempt to use a local mixin named
|
309
|
+
/// `clearfix`. If one is not found, it will use it's own._
|
310
|
+
///
|
311
|
+
/// ```scss
|
312
|
+
/// div {
|
313
|
+
/// @include _(clear);
|
314
|
+
/// }
|
315
|
+
/// ```
|
316
|
+
///
|
317
|
+
/// ### Foundation
|
318
|
+
/// A foundation instance will output a global box-sizing: border-box declaration. If you selected
|
319
|
+
/// `"border-box-sizing": true`, then it is advised to create a global foundation instance. If you
|
320
|
+
/// don't, Flint will automatically apply a foundation instance with your first span declaration.
|
321
|
+
/// This should be placed at the root of your stylesheet. _Flint will attempt to use a local
|
322
|
+
/// mixin named `box-sizing`. If one is not found, it will use it's own._
|
323
|
+
///
|
324
|
+
/// ```scss
|
325
|
+
/// @include _(foundation);
|
326
|
+
/// ```
|
327
|
+
///
|
328
|
+
/// ### Container
|
329
|
+
/// Containers act as a containing row for each individual breakpoint. It uses the `"max-width"`
|
330
|
+
/// setting, if set. They do not float, so if you have `"center-container"` set, then it
|
331
|
+
/// will also center your element using auto left and right margins. You may combine
|
332
|
+
/// container and clear declarations, with arguments separated by a comma.
|
333
|
+
///
|
334
|
+
/// ```scss
|
335
|
+
/// div {
|
336
|
+
/// @include _(container);
|
337
|
+
/// }
|
338
|
+
/// ```
|
339
|
+
///
|
340
|
+
/// ----
|
341
|
+
///
|
342
|
+
/// @access public
|
343
|
+
///
|
344
|
+
/// @param {String|Number|List} $key (null) - key of breakpoint, or shorthand span
|
345
|
+
/// @param {String|Number|List} $span (null) - value of span for column, or shorthand context
|
346
|
+
/// @param {String|Number} $context (null) - context value of span, or null for shorthand
|
347
|
+
/// @param {String|List} $gutter (null) - alias for gutter modifier
|
348
|
+
///
|
349
|
+
/// @throws - Error if list lengths do not match number of breakpoints (when using variable shorthands).
|
350
|
+
///
|
351
|
+
/// ----
|
352
|
+
///
|
353
|
+
/// @example scss - Recursive shorthand with no context
|
354
|
+
/// _(2)
|
355
|
+
///
|
356
|
+
/// @example scss - Recursive shorthand with identical context
|
357
|
+
/// _(2, 4)
|
358
|
+
///
|
359
|
+
/// @example scss - Recursive shorthand with differing context
|
360
|
+
/// _(1, 2 4 6 8)
|
361
|
+
/// _(1, auto)
|
362
|
+
///
|
363
|
+
/// @example scss - Variable shorthand with no context
|
364
|
+
/// _(1 2 3 4)
|
365
|
+
///
|
366
|
+
/// @example scss - Variable shorthand with identical context
|
367
|
+
/// _(1 2 3 4, 4)
|
368
|
+
/// _(1 2 3 4, auto)
|
369
|
+
///
|
370
|
+
/// @example scss - Variable shorthand with differing context
|
371
|
+
/// _(4 3 2 1, 8 6 4 2)
|
372
|
+
/// _(4 3 2 1, auto)
|
373
|
+
///
|
374
|
+
/// @example scss - Call by alias with no context
|
375
|
+
/// _(desktop, 2)
|
376
|
+
///
|
377
|
+
/// @example scss - Call by alias with context
|
378
|
+
/// _(desktop, 2, 4)
|
379
|
+
/// _(desktop, 2, auto)
|
380
|
+
///
|
381
|
+
/// @example scss - Call $key breakpoint by alias
|
382
|
+
/// _(desktop) { ... }
|
383
|
+
///
|
384
|
+
/// @example scss - From $key breakpoint to infinity
|
385
|
+
/// _(from laptop to infinity) { ... }
|
386
|
+
///
|
387
|
+
/// @example scss - From $key-x breakpoint to $key-y breakpoint
|
388
|
+
/// _(from tablet to laptop) { ... }
|
389
|
+
///
|
390
|
+
/// @example scss - From $num-x to $num-y
|
391
|
+
/// _(from 20em to laptop) { ... }
|
392
|
+
///
|
393
|
+
/// @example scss - Greater than $key breakpoint
|
394
|
+
/// _(greater than tablet) { ... }
|
395
|
+
///
|
396
|
+
/// @example scss - Greater than number
|
397
|
+
/// _(greater than 15em) { ... }
|
398
|
+
///
|
399
|
+
/// @example scss - Number greater than $key breakpoint
|
400
|
+
/// _(5em greater than mobile) { ... }
|
401
|
+
///
|
402
|
+
/// @example scss - Less than $key breakpoint
|
403
|
+
/// _(less than laptop) { ... }
|
404
|
+
///
|
405
|
+
/// @example scss - Less than number
|
406
|
+
/// _(less than 35em) { ... }
|
407
|
+
///
|
408
|
+
/// @example scss - Number less than $key breakpoint
|
409
|
+
/// _(10em less than laptop) { ... }
|
410
|
+
///
|
411
|
+
/// @example scss - For $key-x $key-y $key-z...
|
412
|
+
/// _(for mobile tablet desktop) { ... }
|
413
|
+
///
|
414
|
+
/// @example scss - Clear
|
415
|
+
/// _(clear)
|
416
|
+
///
|
417
|
+
/// @example scss - Foundation
|
418
|
+
/// _(foundation)
|
419
|
+
///
|
420
|
+
/// @example scss - Container
|
421
|
+
/// _(container)
|
422
|
+
///
|
423
|
+
/// ----
|
424
|
+
///
|
425
|
+
/// @author Ezekiel Gabrielse
|
426
|
+
/// @link http://flint.gs
|
427
|
+
///
|
428
|
+
/// @group Public API
|
429
|
+
///
|
430
430
|
@mixin _(
|
431
431
|
$key: null,
|
432
432
|
$span: null,
|
@@ -434,15 +434,15 @@
|
|
434
434
|
$gutter: null
|
435
435
|
) {
|
436
436
|
|
437
|
-
|
438
|
-
|
439
|
-
|
437
|
+
//
|
438
|
+
// Clearfix
|
439
|
+
//
|
440
440
|
@if $key == "clear" or $span == "clear" or $context == "clear" {
|
441
441
|
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
442
|
+
//
|
443
|
+
// Check if key exists as breakpoint, and if so wrap
|
444
|
+
// in query to not affect other breakpoints
|
445
|
+
//
|
446
446
|
@if flint-exists($flint, $key) {
|
447
447
|
|
448
448
|
@if flint-get-value("settings", "grid") == "fluid" {
|
@@ -479,9 +479,9 @@
|
|
479
479
|
}
|
480
480
|
}
|
481
481
|
|
482
|
-
|
483
|
-
|
484
|
-
|
482
|
+
//
|
483
|
+
// Foundation
|
484
|
+
//
|
485
485
|
@if $key == "foundation" {
|
486
486
|
|
487
487
|
// Apply global border-box-sizing if set to true
|
@@ -497,9 +497,9 @@
|
|
497
497
|
}
|
498
498
|
}
|
499
499
|
|
500
|
-
|
501
|
-
|
502
|
-
|
500
|
+
//
|
501
|
+
// Container
|
502
|
+
//
|
503
503
|
} @else if $key == "container" or $span == "container" or $context == "container" {
|
504
504
|
|
505
505
|
// Apply individually if foundation is not set globally, but is set to true in config
|
@@ -590,9 +590,9 @@
|
|
590
590
|
}
|
591
591
|
}
|
592
592
|
|
593
|
-
|
594
|
-
|
595
|
-
|
593
|
+
//
|
594
|
+
// Create a new instance, add to global instance map
|
595
|
+
//
|
596
596
|
} @else {
|
597
597
|
|
598
598
|
// Apply individually if foundation is not set globally, but is set to true in config
|
@@ -600,37 +600,37 @@
|
|
600
600
|
@include _("foundation");
|
601
601
|
}
|
602
602
|
|
603
|
-
|
604
|
-
|
605
|
-
|
603
|
+
//
|
604
|
+
// Recursive shorthand with no context
|
605
|
+
//
|
606
606
|
@if flint-is-number($key) and length($key) == 1 and $span == null
|
607
607
|
|
608
|
-
|
609
|
-
|
610
|
-
|
608
|
+
//
|
609
|
+
// Recursive shorthand with identical context
|
610
|
+
//
|
611
611
|
or flint-is-number($key) and length($key) == 1 and flint-is-number($span) and length($span) == 1
|
612
612
|
or flint-is-number($key) and length($key) == 1 and $span == "auto"
|
613
613
|
|
614
|
-
|
615
|
-
|
616
|
-
|
614
|
+
//
|
615
|
+
// Recursive shorthand with differing context
|
616
|
+
//
|
617
617
|
or flint-is-number($key) and length($key) == 1 and flint-types-in-list($span, "number")
|
618
618
|
or flint-is-number($key) and length($key) == 1 and $span == "auto"
|
619
619
|
|
620
|
-
|
621
|
-
|
622
|
-
|
620
|
+
//
|
621
|
+
// Variable shorthand with no context
|
622
|
+
//
|
623
623
|
or flint-types-in-list($key, "number") and $span == null
|
624
624
|
|
625
|
-
|
626
|
-
|
627
|
-
|
625
|
+
//
|
626
|
+
// Variable shorthand with identical context
|
627
|
+
//
|
628
628
|
or flint-types-in-list($key, "number") and flint-is-number($span) and length($span) == 1
|
629
629
|
or flint-types-in-list($key, "number") and $span == "auto"
|
630
630
|
|
631
|
-
|
632
|
-
|
633
|
-
|
631
|
+
//
|
632
|
+
// Variable shorthand with differing context
|
633
|
+
//
|
634
634
|
or flint-types-in-list($key, "number") and flint-types-in-list($span, "number")
|
635
635
|
or flint-types-in-list($key, "number") and $span == "auto" {
|
636
636
|
|
@@ -709,14 +709,14 @@
|
|
709
709
|
}
|
710
710
|
}
|
711
711
|
|
712
|
-
|
713
|
-
|
714
|
-
|
712
|
+
//
|
713
|
+
// Call by alias with no context
|
714
|
+
//
|
715
715
|
} @else if flint-is-string($key) and flint-is-number($span) and $context == null
|
716
716
|
|
717
|
-
|
718
|
-
|
719
|
-
|
717
|
+
//
|
718
|
+
// Call by alias with context
|
719
|
+
//
|
720
720
|
or flint-is-string($key) and flint-is-number($span) and flint-is-number($context)
|
721
721
|
or flint-is-string($key) and flint-is-number($span) and $context == "auto" {
|
722
722
|
|
@@ -788,15 +788,15 @@
|
|
788
788
|
}
|
789
789
|
}
|
790
790
|
|
791
|
-
|
792
|
-
|
793
|
-
|
791
|
+
//
|
792
|
+
// Wrap content in media query
|
793
|
+
//
|
794
794
|
} @else if flint-exists($flint, $key) and $span == null and $context == null
|
795
795
|
or flint-is-list($key) and $span == null and $context == null {
|
796
796
|
|
797
|
-
|
798
|
-
|
799
|
-
|
797
|
+
//
|
798
|
+
// Call $key breakpoint by alias
|
799
|
+
//
|
800
800
|
@if length($key) == 1 {
|
801
801
|
|
802
802
|
@if flint-get-value("settings", "grid") == "fluid" {
|
@@ -825,9 +825,9 @@
|
|
825
825
|
}
|
826
826
|
}
|
827
827
|
|
828
|
-
|
829
|
-
|
830
|
-
|
828
|
+
//
|
829
|
+
// From $key breakpoint to infinity
|
830
|
+
//
|
831
831
|
} @else if flint-types-in-list($key, "string", 4) and nth($key, 1) == "from" and nth($key, 3) == "to" and nth($key, 4) == "infinity" {
|
832
832
|
|
833
833
|
@if flint-get-value("settings", "grid") == "fluid" {
|
@@ -844,9 +844,9 @@
|
|
844
844
|
}
|
845
845
|
}
|
846
846
|
|
847
|
-
|
848
|
-
|
849
|
-
|
847
|
+
//
|
848
|
+
// From $key-x breakpoint to $key-y breakpoint
|
849
|
+
//
|
850
850
|
} @else if flint-types-in-list($key, "string", 4) and nth($key, 1) == "from" and nth($key, 3) == "to" {
|
851
851
|
|
852
852
|
@if flint-get-value("settings", "grid") == "fluid" {
|
@@ -863,9 +863,9 @@
|
|
863
863
|
}
|
864
864
|
}
|
865
865
|
|
866
|
-
|
867
|
-
|
868
|
-
|
866
|
+
//
|
867
|
+
// From $num-x to $num-y
|
868
|
+
//
|
869
869
|
} @else if flint-types-in-list($key, "string" "number" "string" "number", 4) and nth($key, 1) == "from" and nth($key, 3) == "to" {
|
870
870
|
// Make sure passed units match units used in config
|
871
871
|
@if flint-get-config-unit() == unit(nth($key, 2)) and flint-get-config-unit() == unit(nth($key, 4)) {
|
@@ -879,9 +879,9 @@
|
|
879
879
|
}
|
880
880
|
}
|
881
881
|
|
882
|
-
|
883
|
-
|
884
|
-
|
882
|
+
//
|
883
|
+
// Greater than $key breakpoint
|
884
|
+
//
|
885
885
|
} @else if flint-types-in-list($key, "string", 3) and nth($key, 1) == "greater" and nth($key, 2) == "than" {
|
886
886
|
|
887
887
|
@if flint-get-value("settings", "grid") == "fluid" {
|
@@ -898,9 +898,9 @@
|
|
898
898
|
}
|
899
899
|
}
|
900
900
|
|
901
|
-
|
902
|
-
|
903
|
-
|
901
|
+
//
|
902
|
+
// Greater than number
|
903
|
+
//
|
904
904
|
} @else if flint-types-in-list($key, "string" "string" "number", 3) and nth($key, 1) == "greater" and nth($key, 2) == "than" {
|
905
905
|
|
906
906
|
@if flint-get-config-unit() == unit(nth($key, 3)) {
|
@@ -913,9 +913,9 @@
|
|
913
913
|
}
|
914
914
|
}
|
915
915
|
|
916
|
-
|
917
|
-
|
918
|
-
|
916
|
+
//
|
917
|
+
// Number greater than $key breakpoint
|
918
|
+
//
|
919
919
|
} @else if flint-types-in-list($key, "number" "string" "string" "string", 4) and nth($key, 2) == "greater" and nth($key, 3) == "than" {
|
920
920
|
|
921
921
|
@if flint-get-config-unit() == unit(nth($key, 1)) {
|
@@ -928,9 +928,9 @@
|
|
928
928
|
}
|
929
929
|
}
|
930
930
|
|
931
|
-
|
932
|
-
|
933
|
-
|
931
|
+
//
|
932
|
+
// Less than $key breakpoint
|
933
|
+
//
|
934
934
|
} @else if flint-types-in-list($key, "string", 3) and nth($key, 1) == "less" and nth($key, 2) == "than" {
|
935
935
|
|
936
936
|
@if flint-get-value("settings", "grid") == "fluid" {
|
@@ -947,9 +947,9 @@
|
|
947
947
|
}
|
948
948
|
}
|
949
949
|
|
950
|
-
|
951
|
-
|
952
|
-
|
950
|
+
//
|
951
|
+
// Less than number
|
952
|
+
//
|
953
953
|
} @else if flint-types-in-list($key, "string" "string" "number", 3) and nth($key, 1) == "less" and nth($key, 2) == "than" {
|
954
954
|
|
955
955
|
@if flint-get-config-unit() == unit(nth($key, 3)) {
|
@@ -962,9 +962,9 @@
|
|
962
962
|
}
|
963
963
|
}
|
964
964
|
|
965
|
-
|
966
|
-
|
967
|
-
|
965
|
+
//
|
966
|
+
// Number less than $key breakpoint
|
967
|
+
//
|
968
968
|
} @else if flint-types-in-list($key, "number" "string" "string" "string", 4) and nth($key, 2) == "less" and nth($key, 3) == "than" {
|
969
969
|
|
970
970
|
@if flint-get-config-unit() == unit(nth($key, 1)) {
|
@@ -977,16 +977,16 @@
|
|
977
977
|
}
|
978
978
|
}
|
979
979
|
|
980
|
-
|
981
|
-
|
982
|
-
|
980
|
+
//
|
981
|
+
// For $key-x $key-y $key-z
|
982
|
+
//
|
983
983
|
} @else if flint-types-in-list($key, "string") and nth($key, 1) == "for" {
|
984
984
|
// Define empty query list
|
985
985
|
$query: ();
|
986
986
|
|
987
|
-
|
988
|
-
|
989
|
-
|
987
|
+
//
|
988
|
+
// Build out comma delimited query list for each breakpoint
|
989
|
+
//
|
990
990
|
@for $i from 1 through length($key) {
|
991
991
|
$calc-key: nth($key, $i);
|
992
992
|
|
@@ -1022,9 +1022,9 @@
|
|
1022
1022
|
}
|
1023
1023
|
}
|
1024
1024
|
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1025
|
+
//
|
1026
|
+
// Invalid argument
|
1027
|
+
//
|
1028
1028
|
} @else {
|
1029
1029
|
@if $key != "clear" {
|
1030
1030
|
@if not $flint__development-mode {
|