flint-gs 1.0.4 → 1.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83509734957f3f25f64cd87f5177e7f8072d9a4f
4
- data.tar.gz: 1217f8221350a84a54dd376911935d848678a6ea
3
+ metadata.gz: 0037eb31b05237d1557d5fb3f190ac036e2237bc
4
+ data.tar.gz: fbbbe97e0fc1b5bf62d6a94057ac663b04c46a96
5
5
  SHA512:
6
- metadata.gz: 8450cf79f2adf5028b176b294bbfdf99b8aac8b8e85f14c6dc5e47fa1e1bf2522582f282c0413c1c6870d3449b477a1f4586a94ddbe8a19cc41c5dc810ebc543
7
- data.tar.gz: 554911cc02099f6623f767dbb02769be3814eccefb9d203b3075ce4595ca9d30be08784b26cf3c643423792ab2950ef6cbe02fdc6fe7f39d53a9fe40af089faf
6
+ metadata.gz: 30087aa875518d81c981b3b3d1b497ab79d95d9900292af38308c6eeeba80b84b9fae70c546af10e7e2c44f6fd0fe8520be1de1ebbe50b62f5f77568cf131f73
7
+ data.tar.gz: 3a79ea3e906b94bf05c073a936b5e0f9196a3b0cecba8207314070fdb1af1b78b911d88a44e653bf6bd73fd39012d5953b69aea987d21d16579b3d2cc630a6c8
data/lib/flint.rb CHANGED
@@ -5,7 +5,7 @@ Compass::Frameworks.register('flint', :path => extension_path)
5
5
  # Version is a number. If a version contains alphas, it will be created as a prerelease version
6
6
  # Date is in the form of YYYY-MM-DD
7
7
  module Flint
8
- VERSION = "1.0.4"
8
+ VERSION = "1.0.5"
9
9
  DATE = "2014-04-24"
10
10
  end
11
11
 
@@ -139,6 +139,20 @@
139
139
  }
140
140
  }
141
141
 
142
+ // Checks if $key is grid default
143
+ // -------------------------------------------------------------------------------
144
+ // @dependence `get-value()`
145
+ // -------------------------------------------------------------------------------
146
+ // @return [Boolean]
147
+
148
+ @function is-default($key) {
149
+ @if $key == get-value(settings, default) {
150
+ @return true;
151
+ } @else {
152
+ @return false;
153
+ }
154
+ }
155
+
142
156
  // Gets all breakpoint column values
143
157
  // -------------------------------------------------------------------------------
144
158
  // @return [List]
@@ -27,12 +27,20 @@
27
27
  } @else {
28
28
  @return get-value($key, breakpoint);
29
29
  }
30
- } @else if $n == "to" {
30
+ } @else if $n == "alt-from" {
31
+ @if is-lowest-breakpoint($key) {
32
+ @return 0;
33
+ } @else {
34
+ @return get-value($key, breakpoint) - 1;
35
+ }
36
+ }@else if $n == "to" {
31
37
  @if steal-key($i) != steal-key(1) {
32
38
  @return (get-value(steal-key(($i - 1)), breakpoint) - 1);
33
39
  } @else {
34
40
  @return (get-value(steal-key($i), breakpoint) - 1);
35
41
  }
42
+ } @else if $n == "alt-to" {
43
+ @return (get-value(steal-key($i), breakpoint));
36
44
  }
37
45
  }
38
46
  }
@@ -46,110 +46,144 @@
46
46
 
47
47
  }
48
48
 
49
- @if $calcShift != NULL and $calcContext == NULL {
49
+ // Hide if span is zero
50
+ @if $calcSpan == 0 {
51
+ // First check if it's the default, so we don't hide the element on all breakpoints
52
+ @if $calcKey == get-value(settings, default) {
53
+ @include _($calcKey) {
54
+ display: none;
55
+ }
56
+ } @else {
57
+ display: none;
58
+ }
50
59
 
51
- @if $calcGutter == NULL and get-value(settings, gutter) != false {
60
+ } @else {
52
61
 
53
- // Save to variables for instance creation
54
- $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*2);
55
- $outputMarginRight: calc-margin($calcKey, $calcSpan);
56
- $outputMarginLeft: ( if( $calcShift > 0,
57
- (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)),
58
- (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift))
59
- ));
62
+ @if $calcShift != NULL and $calcContext == NULL {
60
63
 
61
- // Output styles
62
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
63
- @content;
64
- }
64
+ @if $calcGutter == NULL and get-value(settings, gutter) != false {
65
65
 
66
- // Create new instance for memoization
67
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
66
+ // Save to variables for instance creation
67
+ $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*2);
68
+ $outputMarginRight: calc-margin($calcKey, $calcSpan);
69
+ $outputMarginLeft: ( if( $calcShift > 0,
70
+ (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)),
71
+ (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift))
72
+ ));
73
+
74
+ // Output styles
75
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
76
+ @content;
77
+ }
68
78
 
69
- // If debug mode, print instance
70
- @include debugPrintInstance($calcKey);
79
+ // Create new instance for memoization
80
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
71
81
 
72
- } @else if $calcGutter == "inside" and get-value(settings, gutter) != false {
82
+ // If debug mode, print instance
83
+ @include debugPrintInstance($calcKey);
73
84
 
74
- $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*4);
75
- $outputMarginRight: calc-margin($calcKey, $calcSpan);
76
- $outputMarginLeft: ( if( $calcShift > 0,
77
- (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)),
78
- (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift))
79
- ));
85
+ } @else if $calcGutter == "inside" and get-value(settings, gutter) != false {
80
86
 
81
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
82
- @content;
83
- }
87
+ $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*4);
88
+ $outputMarginRight: calc-margin($calcKey, $calcSpan);
89
+ $outputMarginLeft: ( if( $calcShift > 0,
90
+ (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)),
91
+ (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift))
92
+ ));
84
93
 
85
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
86
- @include debugPrintInstance($calcKey);
94
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
95
+ @content;
96
+ }
87
97
 
88
- } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
98
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
99
+ @include debugPrintInstance($calcKey);
89
100
 
90
- $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
91
- $outputMarginRight: calc-margin($calcKey, $calcSpan);
92
- $outputMarginLeft: ( if( $calcShift > 0,
93
- calc-width($calcKey, $calcShift),
94
- calc-width($calcKey, $calcShift)
95
- ));
101
+ } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
96
102
 
97
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
98
- @content;
99
- }
103
+ $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
104
+ $outputMarginRight: calc-margin($calcKey, $calcSpan);
105
+ $outputMarginLeft: ( if( $calcShift > 0,
106
+ calc-width($calcKey, $calcShift),
107
+ calc-width($calcKey, $calcShift)
108
+ ));
100
109
 
101
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
102
- @include debugPrintInstance($calcKey);
110
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
111
+ @content;
112
+ }
103
113
 
104
- } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
114
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
115
+ @include debugPrintInstance($calcKey);
105
116
 
106
- $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan)));
107
- $outputMarginRight: 0;
108
- $outputMarginLeft: ( if( $calcShift > 0,
109
- (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)),
110
- (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift))
111
- ));
117
+ } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
112
118
 
113
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
114
- @content;
115
- }
119
+ $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan)));
120
+ $outputMarginRight: 0;
121
+ $outputMarginLeft: ( if( $calcShift > 0,
122
+ (calc-margin($calcKey, $calcSpan)) + (calc-width($calcKey, $calcShift)),
123
+ (calc-margin($calcKey, -$calcSpan)) + (calc-width($calcKey, $calcShift))
124
+ ));
116
125
 
117
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
118
- @include debugPrintInstance($calcKey);
126
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
127
+ @content;
128
+ }
119
129
 
120
- } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
130
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
131
+ @include debugPrintInstance($calcKey);
121
132
 
122
- $outputWidth: (calc-width($calcKey, $calcSpan));
123
- $outputMarginRight: 0;
124
- $outputMarginLeft: ( if( $calcShift > 0,
125
- calc-width($calcKey, $calcShift),
126
- calc-width($calcKey, $calcShift)
127
- ));
133
+ } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
128
134
 
129
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
130
- @content;
131
- }
135
+ $outputWidth: (calc-width($calcKey, $calcSpan));
136
+ $outputMarginRight: 0;
137
+ $outputMarginLeft: ( if( $calcShift > 0,
138
+ calc-width($calcKey, $calcShift),
139
+ calc-width($calcKey, $calcShift)
140
+ ));
132
141
 
133
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
134
- @include debugPrintInstance($calcKey);
135
- }
142
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
143
+ @content;
144
+ }
136
145
 
137
- } @else if $calcContext != NULL {
138
- // Check if context of parent instance exists
139
- $exists: get-family-instance($calcKey);
146
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
147
+ @include debugPrintInstance($calcKey);
148
+ }
140
149
 
141
- @if $calcShift != NULL {
142
- @if $calcGutter == NULL and get-value(settings, gutter) != false {
143
- // Check if context is set to auto
144
- @if $calcContext == "auto" {
145
- // Does parent exist?
146
- @if $exists != false {
150
+ } @else if $calcContext != NULL {
151
+ // Check if context of parent instance exists
152
+ $exists: get-family-instance($calcKey);
153
+
154
+ @if $calcShift != NULL {
155
+ @if $calcGutter == NULL and get-value(settings, gutter) != false {
156
+ // Check if context is set to auto
157
+ @if $calcContext == "auto" {
158
+ // Does parent exist?
159
+ @if $exists != false {
160
+
161
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*2);
162
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
163
+ $outputMarginLeft: ( if( $calcShift > 0,
164
+ (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))),
165
+ (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))))
166
+ ));
167
+
168
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
169
+ @content;
170
+ }
171
+
172
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
173
+ @include debugPrintInstance($calcKey);
174
+
175
+ } @else {
176
+ // Else warn that context should not be set to `auto`
177
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
178
+ }
179
+ // Output styles normally if not set to auto
180
+ } @else {
147
181
 
148
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*2);
149
- $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
182
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2);
183
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
150
184
  $outputMarginLeft: ( if( $calcShift > 0,
151
- (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))),
152
- (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))))
185
+ (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)),
186
+ (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext))
153
187
  ));
154
188
 
155
189
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
@@ -158,39 +192,39 @@
158
192
 
159
193
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
160
194
  @include debugPrintInstance($calcKey);
161
-
162
- } @else {
163
- // Else warn that context should not be set to `auto`
164
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
165
- }
166
- // Output styles normally if not set to auto
167
- } @else {
168
-
169
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2);
170
- $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
171
- $outputMarginLeft: ( if( $calcShift > 0,
172
- (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)),
173
- (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext))
174
- ));
175
-
176
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
177
- @content;
178
195
  }
179
196
 
180
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
181
- @include debugPrintInstance($calcKey);
182
- }
197
+ } @else if $calcGutter == "inside" and get-value(settings, gutter) != false {
183
198
 
184
- } @else if $calcGutter == "inside" and get-value(settings, gutter) != false {
199
+ @if $calcContext == "auto" {
200
+ @if $exists != false {
185
201
 
186
- @if $calcContext == "auto" {
187
- @if $exists != false {
202
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*4);
203
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
204
+ $outputMarginLeft: ( if( $calcShift > 0,
205
+ (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))),
206
+ (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))))
207
+ ));
208
+
209
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
210
+ @content;
211
+ }
212
+
213
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
214
+ @include debugPrintInstance($calcKey);
215
+
216
+ } @else {
217
+ // Else warn that context should not be set to `auto`
218
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
219
+ }
220
+ // Output styles normally if not set to auto
221
+ } @else {
188
222
 
189
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*4);
190
- $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
223
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2);
224
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
191
225
  $outputMarginLeft: ( if( $calcShift > 0,
192
- (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))),
193
- (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))))
226
+ (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)),
227
+ (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext))
194
228
  ));
195
229
 
196
230
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
@@ -199,39 +233,37 @@
199
233
 
200
234
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
201
235
  @include debugPrintInstance($calcKey);
202
-
203
- } @else {
204
- // Else warn that context should not be set to `auto`
205
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
206
- }
207
- // Output styles normally if not set to auto
208
- } @else {
209
-
210
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2);
211
- $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
212
- $outputMarginLeft: ( if( $calcShift > 0,
213
- (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)),
214
- (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext))
215
- ));
216
-
217
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
218
- @content;
219
236
  }
220
237
 
221
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
222
- @include debugPrintInstance($calcKey);
223
- }
238
+ } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
224
239
 
225
- } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
240
+ @if $calcContext == "auto" {
241
+ @if $exists != false {
226
242
 
227
- @if $calcContext == "auto" {
228
- @if $exists != false {
243
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))));
244
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
245
+ $outputMarginLeft: ( if( $calcShift > 0,
246
+ calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))),
247
+ calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))
248
+ ));
249
+
250
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
251
+ @content;
252
+ }
253
+
254
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
255
+ @include debugPrintInstance($calcKey);
256
+
257
+ } @else {
258
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
259
+ }
260
+ } @else {
229
261
 
230
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))));
231
- $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
262
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext));
263
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
232
264
  $outputMarginLeft: ( if( $calcShift > 0,
233
- calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))),
234
- calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))
265
+ calc-width($calcKey, $calcShift, $calcContext),
266
+ calc-width($calcKey, $calcShift, $calcContext)
235
267
  ));
236
268
 
237
269
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
@@ -240,37 +272,37 @@
240
272
 
241
273
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
242
274
  @include debugPrintInstance($calcKey);
243
-
244
- } @else {
245
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
246
275
  }
247
- } @else {
248
276
 
249
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext));
250
- $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
251
- $outputMarginLeft: ( if( $calcShift > 0,
252
- calc-width($calcKey, $calcShift, $calcContext),
253
- calc-width($calcKey, $calcShift, $calcContext)
254
- ));
277
+ } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
255
278
 
256
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
257
- @content;
258
- }
279
+ @if $calcContext == "auto" {
280
+ @if $exists != false {
259
281
 
260
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
261
- @include debugPrintInstance($calcKey);
262
- }
282
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))));
283
+ $outputMarginRight: 0;
284
+ $outputMarginLeft: ( if( $calcShift > 0,
285
+ (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))),
286
+ (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))))
287
+ ));
263
288
 
264
- } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
289
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
290
+ @content;
291
+ }
265
292
 
266
- @if $calcContext == "auto" {
267
- @if $exists != false {
293
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
294
+ @include debugPrintInstance($calcKey);
268
295
 
269
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))));
296
+ } @else {
297
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
298
+ }
299
+ } @else {
300
+
301
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext)));
270
302
  $outputMarginRight: 0;
271
303
  $outputMarginLeft: ( if( $calcShift > 0,
272
- (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))),
273
- (calc-margin($calcKey, -$calcSpan, to-number(get-instance-value($calcKey, span)))) + (calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))))
304
+ (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)),
305
+ (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext))
274
306
  ));
275
307
 
276
308
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
@@ -279,37 +311,37 @@
279
311
 
280
312
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
281
313
  @include debugPrintInstance($calcKey);
282
-
283
- } @else {
284
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
285
314
  }
286
- } @else {
287
315
 
288
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext)));
289
- $outputMarginRight: 0;
290
- $outputMarginLeft: ( if( $calcShift > 0,
291
- (calc-margin($calcKey, $calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext)),
292
- (calc-margin($calcKey, -$calcSpan, $calcContext)) + (calc-width($calcKey, $calcShift, $calcContext))
293
- ));
316
+ } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
294
317
 
295
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
296
- @content;
297
- }
318
+ @if $calcContext == "auto" {
319
+ @if $exists != false {
298
320
 
299
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
300
- @include debugPrintInstance($calcKey);
301
- }
321
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))));
322
+ $outputMarginRight: 0;
323
+ $outputMarginLeft: ( if( $calcShift > 0,
324
+ calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))),
325
+ calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))
326
+ ));
302
327
 
303
- } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
328
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
329
+ @content;
330
+ }
304
331
 
305
- @if $calcContext == "auto" {
306
- @if $exists != false {
332
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
333
+ @include debugPrintInstance($calcKey);
307
334
 
308
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))));
335
+ } @else {
336
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
337
+ }
338
+ } @else {
339
+
340
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext));
309
341
  $outputMarginRight: 0;
310
342
  $outputMarginLeft: ( if( $calcShift > 0,
311
- calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span))),
312
- calc-width($calcKey, $calcShift, to-number(get-instance-value($calcKey, span)))
343
+ calc-width($calcKey, $calcShift, $calcContext),
344
+ calc-width($calcKey, $calcShift, $calcContext)
313
345
  ));
314
346
 
315
347
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
@@ -318,37 +350,36 @@
318
350
 
319
351
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
320
352
  @include debugPrintInstance($calcKey);
321
-
322
- } @else {
323
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
324
353
  }
325
- } @else {
326
-
327
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext));
328
- $outputMarginRight: 0;
329
- $outputMarginLeft: ( if( $calcShift > 0,
330
- calc-width($calcKey, $calcShift, $calcContext),
331
- calc-width($calcKey, $calcShift, $calcContext)
332
- ));
333
-
334
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
335
- @content;
336
- }
337
-
338
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
339
- @include debugPrintInstance($calcKey);
340
354
  }
341
- }
342
- } @else {
343
- @if $calcGutter == NULL and get-value(settings, gutter) != false {
344
- // Check if context is set to auto
345
- @if $calcContext == "auto" {
346
- // Did it exist?
347
- @if $exists != false {
355
+ } @else {
356
+ @if $calcGutter == NULL and get-value(settings, gutter) != false {
357
+ // Check if context is set to auto
358
+ @if $calcContext == "auto" {
359
+ // Did it exist?
360
+ @if $exists != false {
361
+
362
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*2);
363
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
364
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
365
+
366
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
367
+ @content;
368
+ }
369
+
370
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
371
+ @include debugPrintInstance($calcKey);
372
+
373
+ } @else {
374
+ // Else warn that context should not be set to `auto`
375
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
376
+ }
377
+ // Output styles normally if not set to auto
378
+ } @else {
348
379
 
349
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*2);
350
- $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
351
- $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
380
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2);
381
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
382
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext);
352
383
 
353
384
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
354
385
  @content;
@@ -356,34 +387,32 @@
356
387
 
357
388
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
358
389
  @include debugPrintInstance($calcKey);
359
-
360
- } @else {
361
- // Else warn that context should not be set to `auto`
362
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
363
390
  }
364
- // Output styles normally if not set to auto
365
- } @else {
366
391
 
367
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2);
368
- $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
369
- $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext);
392
+ } @else if $calcGutter == "inside" and get-value(settings, gutter) != false {
370
393
 
371
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
372
- @content;
373
- }
394
+ @if $calcContext == "auto" {
395
+ @if $exists != false {
374
396
 
375
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
376
- @include debugPrintInstance($calcKey);
377
- }
397
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*4);
398
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
399
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
378
400
 
379
- } @else if $calcGutter == "inside" and get-value(settings, gutter) != false {
401
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
402
+ @content;
403
+ }
380
404
 
381
- @if $calcContext == "auto" {
382
- @if $exists != false {
405
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
406
+ @include debugPrintInstance($calcKey);
407
+
408
+ } @else {
409
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
410
+ }
411
+ } @else {
383
412
 
384
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - ((calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))))*4);
385
- $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
386
- $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
413
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2);
414
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
415
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext);
387
416
 
388
417
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
389
418
  @content;
@@ -391,31 +420,31 @@
391
420
 
392
421
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
393
422
  @include debugPrintInstance($calcKey);
394
-
395
- } @else {
396
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
397
423
  }
398
- } @else {
399
424
 
400
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - ((calc-margin($calcKey, $calcSpan, $calcContext))*2);
401
- $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
402
- $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext);
425
+ } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
403
426
 
404
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
405
- @content;
406
- }
427
+ @if $calcContext == "auto" {
428
+ @if $exists != false {
407
429
 
408
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
409
- @include debugPrintInstance($calcKey);
410
- }
430
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))));
431
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
432
+ $outputMarginLeft: 0;
411
433
 
412
- } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
434
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
435
+ @content;
436
+ }
413
437
 
414
- @if $calcContext == "auto" {
415
- @if $exists != false {
438
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
439
+ @include debugPrintInstance($calcKey);
440
+
441
+ } @else {
442
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
443
+ }
444
+ } @else {
416
445
 
417
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))));
418
- $outputMarginRight: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
446
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext));
447
+ $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
419
448
  $outputMarginLeft: 0;
420
449
 
421
450
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
@@ -424,32 +453,32 @@
424
453
 
425
454
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
426
455
  @include debugPrintInstance($calcKey);
427
-
428
- } @else {
429
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
430
456
  }
431
- } @else {
432
457
 
433
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext));
434
- $outputMarginRight: calc-margin($calcKey, $calcSpan, $calcContext);
435
- $outputMarginLeft: 0;
458
+ } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
436
459
 
437
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
438
- @content;
439
- }
460
+ @if $calcContext == "auto" {
461
+ @if $exists != false {
440
462
 
441
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
442
- @include debugPrintInstance($calcKey);
443
- }
463
+ $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))));
464
+ $outputMarginRight: 0;
465
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
444
466
 
445
- } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
467
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
468
+ @content;
469
+ }
446
470
 
447
- @if $calcContext == "auto" {
448
- @if $exists != false {
471
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
472
+ @include debugPrintInstance($calcKey);
449
473
 
450
- $outputWidth: (calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)))) - (calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span))));
474
+ } @else {
475
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
476
+ }
477
+ } @else {
478
+
479
+ $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext));
451
480
  $outputMarginRight: 0;
452
- $outputMarginLeft: calc-margin($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
481
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext);
453
482
 
454
483
  @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
455
484
  @content;
@@ -457,30 +486,30 @@
457
486
 
458
487
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
459
488
  @include debugPrintInstance($calcKey);
460
-
461
- } @else {
462
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
463
489
  }
464
- } @else {
465
490
 
466
- $outputWidth: (calc-width($calcKey, $calcSpan, $calcContext)) - (calc-margin($calcKey, $calcSpan, $calcContext));
467
- $outputMarginRight: 0;
468
- $outputMarginLeft: calc-margin($calcKey, $calcSpan, $calcContext);
491
+ } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
469
492
 
470
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
471
- @content;
472
- }
493
+ @if $calcContext == "auto" {
494
+ @if $exists != false {
473
495
 
474
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
475
- @include debugPrintInstance($calcKey);
476
- }
496
+ $outputWidth: calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
497
+ $outputMarginRight: 0;
498
+ $outputMarginLeft: 0;
477
499
 
478
- } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
500
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
501
+ @content;
502
+ }
503
+
504
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
505
+ @include debugPrintInstance($calcKey);
479
506
 
480
- @if $calcContext == "auto" {
481
- @if $exists != false {
507
+ } @else {
508
+ @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
509
+ }
510
+ } @else {
482
511
 
483
- $outputWidth: calc-width($calcKey, $calcSpan, to-number(get-instance-value($calcKey, span)));
512
+ $outputWidth: calc-width($calcKey, $calcSpan, $calcContext);
484
513
  $outputMarginRight: 0;
485
514
  $outputMarginLeft: 0;
486
515
 
@@ -490,93 +519,78 @@
490
519
 
491
520
  @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
492
521
  @include debugPrintInstance($calcKey);
493
-
494
- } @else {
495
- @warn "You set context to `#{$calcContext}`, but a parent instance could not be found for `#{selector_string()}`";
496
522
  }
497
- } @else {
498
-
499
- $outputWidth: calc-width($calcKey, $calcSpan, $calcContext);
500
- $outputMarginRight: 0;
501
- $outputMarginLeft: 0;
502
-
503
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
504
- @content;
505
- }
506
-
507
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
508
- @include debugPrintInstance($calcKey);
509
523
  }
510
524
  }
511
- }
512
525
 
513
- } @else {
526
+ } @else {
514
527
 
515
- @if $calcGutter == NULL and get-value(settings, gutter) != false {
528
+ @if $calcGutter == NULL and get-value(settings, gutter) != false {
516
529
 
517
- $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*2);
518
- $outputMarginRight: calc-margin($calcKey, $calcSpan);
519
- $outputMarginLeft: calc-margin($calcKey, $calcSpan);
530
+ $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*2);
531
+ $outputMarginRight: calc-margin($calcKey, $calcSpan);
532
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan);
520
533
 
521
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
522
- @content;
523
- }
534
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
535
+ @content;
536
+ }
524
537
 
525
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
526
- @include debugPrintInstance($calcKey);
538
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
539
+ @include debugPrintInstance($calcKey);
527
540
 
528
- } @else if $calcGutter == "inside" and get-value(settings, gutter) != false {
541
+ } @else if $calcGutter == "inside" and get-value(settings, gutter) != false {
529
542
 
530
- $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*4);
531
- $outputMarginRight: calc-margin($calcKey, $calcSpan);
532
- $outputMarginLeft: calc-margin($calcKey, $calcSpan);
543
+ $outputWidth: (calc-width($calcKey, $calcSpan)) - ((calc-margin($calcKey, $calcSpan))*4);
544
+ $outputMarginRight: calc-margin($calcKey, $calcSpan);
545
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan);
533
546
 
534
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
535
- @content;
536
- }
547
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
548
+ @content;
549
+ }
537
550
 
538
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
539
- @include debugPrintInstance($calcKey);
551
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
552
+ @include debugPrintInstance($calcKey);
540
553
 
541
- } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
554
+ } @else if $calcGutter == "alpha" and get-value(settings, gutter) != false {
542
555
 
543
- $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
544
- $outputMarginRight: calc-margin($calcKey, $calcSpan);
545
- $outputMarginLeft: 0;
556
+ $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
557
+ $outputMarginRight: calc-margin($calcKey, $calcSpan);
558
+ $outputMarginLeft: 0;
546
559
 
547
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
548
- @content;
549
- }
560
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
561
+ @content;
562
+ }
550
563
 
551
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
552
- @include debugPrintInstance($calcKey);
564
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
565
+ @include debugPrintInstance($calcKey);
553
566
 
554
- } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
567
+ } @else if $calcGutter == "omega" and get-value(settings, gutter) != false {
555
568
 
556
- $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
557
- $outputMarginRight: 0;
558
- $outputMarginLeft: calc-margin($calcKey, $calcSpan);
569
+ $outputWidth: (calc-width($calcKey, $calcSpan)) - (calc-margin($calcKey, $calcSpan));
570
+ $outputMarginRight: 0;
571
+ $outputMarginLeft: calc-margin($calcKey, $calcSpan);
559
572
 
560
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
561
- @content;
562
- }
573
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
574
+ @content;
575
+ }
563
576
 
564
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
565
- @include debugPrintInstance($calcKey);
577
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
578
+ @include debugPrintInstance($calcKey);
566
579
 
567
- } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
580
+ } @else if $calcGutter == "row" or get-value(settings, gutter) == false {
568
581
 
569
- $outputWidth: calc-width($calcKey, $calcSpan);
570
- $outputMarginRight: 0;
571
- $outputMarginLeft: 0;
582
+ $outputWidth: calc-width($calcKey, $calcSpan);
583
+ $outputMarginRight: 0;
584
+ $outputMarginLeft: 0;
572
585
 
573
- @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
574
- @content;
575
- }
586
+ @include outputFlint($outputWidth, $outputMarginRight, $outputMarginLeft) {
587
+ @content;
588
+ }
576
589
 
577
- @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
578
- @include debugPrintInstance($calcKey);
590
+ @include newInstance ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $outputWidth, $outputMarginRight, $outputMarginLeft);
591
+ @include debugPrintInstance($calcKey);
579
592
 
593
+ }
580
594
  }
581
595
  }
582
596
  }
@@ -43,7 +43,7 @@
43
43
  {
44
44
 
45
45
  // only apply display rule if the key is the default
46
- @if $key == get-value(settings, default) or $key == "container" {
46
+ @if is-default($key) or $key == "container" {
47
47
 
48
48
  display: block;
49
49
 
@@ -52,7 +52,7 @@
52
52
  @for $i from 1 through length($flint__all__keys) {
53
53
  $calcKey: steal-key($i);
54
54
 
55
- @if $calcKey == get-value(settings, default) {
55
+ @if is-default($calcKey) {
56
56
  display: block;
57
57
  }
58
58
  }
@@ -94,7 +94,7 @@
94
94
 
95
95
  } @else {
96
96
 
97
- @if $key == get-value(settings, default) {
97
+ @if is-default($key) {
98
98
 
99
99
  float: unquote(get-value(settings, float-style));
100
100
 
@@ -103,7 +103,7 @@
103
103
  @for $i from 1 through length($flint__all__keys) {
104
104
  $calcKey: steal-key($i);
105
105
 
106
- @if $calcKey == get-value(settings, default) {
106
+ @if is-default($calcKey) {
107
107
  float: unquote(get-value(settings, float-style));
108
108
  }
109
109
  }
@@ -136,7 +136,7 @@
136
136
  width: calc-width($calcKey, $calcSpan);
137
137
  @content;
138
138
  }
139
- } @else if get-value(settings, default) == $calcKey {
139
+ } @else if is-default($calcKey) {
140
140
  width: calc-width($calcKey, $calcSpan);
141
141
  @content;
142
142
  } @else {
@@ -160,7 +160,7 @@
160
160
  $calcGutter: $gutter;
161
161
  $calcShift: $shift;
162
162
 
163
- @if get-value(settings, default) == $calcKey {
163
+ @if is-default($calcKey) {
164
164
 
165
165
  @include calcFlint ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $i);
166
166
 
@@ -199,7 +199,7 @@
199
199
  $calcGutter: $gutter;
200
200
  $calcShift: $shift;
201
201
 
202
- @if get-value(settings, default) == $calcKey {
202
+ @if is-default($calcKey) {
203
203
 
204
204
  @include calcFlint ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $i);
205
205
 
@@ -238,7 +238,7 @@
238
238
  $calcGutter: $gutter;
239
239
  $calcShift: $shift;
240
240
 
241
- @if get-value(settings, default) == $calcKey {
241
+ @if is-default($calcKey) {
242
242
 
243
243
  @include calcFlint ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $i);
244
244
 
@@ -282,7 +282,7 @@
282
282
  $calcGutter: $gutter;
283
283
  $calcShift: $shift;
284
284
 
285
- @if get-value(settings, default) == $calcKey {
285
+ @if is-default($calcKey) {
286
286
 
287
287
  @include calcFlint ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $i);
288
288
 
@@ -324,7 +324,7 @@
324
324
  $calcGutter: $gutter;
325
325
  $calcShift: $shift;
326
326
 
327
- @if get-value(settings, default) == $calcKey {
327
+ @if is-default($calcKey) {
328
328
 
329
329
  @include calcFlint ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift, $i);
330
330
 
@@ -361,7 +361,7 @@
361
361
  $calcGutter: $gutter;
362
362
  $calcShift: $shift;
363
363
 
364
- @if get-value(settings, default) == $calcKey {
364
+ @if is-default($calcKey) {
365
365
 
366
366
  @include calcFlint ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift);
367
367
 
@@ -398,7 +398,7 @@
398
398
  $calcGutter: $gutter;
399
399
  $calcShift: $shift;
400
400
 
401
- @if get-value(settings, default) == $calcKey {
401
+ @if is-default($calcKey) {
402
402
 
403
403
  @include calcFlint ($calcKey, $calcSpan, $calcContext, $calcGutter, $calcShift);
404
404
 
@@ -456,19 +456,25 @@
456
456
  // greater than key-x breakpoint
457
457
  } @else if length($key) > 1 and nth($key, 1) == "greater" and nth($key, 2) == "than" {
458
458
  @if get-value(settings, grid) == "fluid" {
459
- @media only screen and ( min-width: (calc-breakpoint(to, nth($key, 3), get-index(nth($key, 3))) + 1) ) {
459
+ @media only screen and ( min-width: (calc-breakpoint(to, nth($key, 3), get-index(nth($key, 3)))) ) {
460
460
  @content;
461
461
  }
462
462
  } @else if get-value(settings, grid) == "fixed" {
463
- @media only screen and ( min-width: (calc-breakpoint(to, nth($key, 3), get-index(nth($key, 3)))) ) {
463
+ @media only screen and ( min-width: (calc-breakpoint(alt-to, nth($key, 3), get-index(nth($key, 3)))) ) {
464
464
  @content;
465
465
  }
466
466
  }
467
467
 
468
468
  // (y)px greater than key-x breakpoint
469
469
  } @else if length($key) > 1 and nth($key, 2) == "greater" and nth($key, 3) == "than" {
470
- @media only screen and ( min-width: (calc-breakpoint(to, nth($key, 4), get-index(nth($key, 4))) + nth($key, 1)) ) {
471
- @content;
470
+ @if get-value(settings, grid) == "fluid" {
471
+ @media only screen and ( min-width: (calc-breakpoint(to, nth($key, 4), get-index(nth($key, 4))) + nth($key, 1)) ) {
472
+ @content;
473
+ }
474
+ } @else if get-value(settings, grid) == "fixed" {
475
+ @media only screen and ( min-width: (calc-breakpoint(alt-to, nth($key, 4), get-index(nth($key, 4))) + nth($key, 1)) ) {
476
+ @content;
477
+ }
472
478
  }
473
479
 
474
480
  // less than key-x breakpoint
@@ -478,15 +484,21 @@
478
484
  @content;
479
485
  }
480
486
  } @else if get-value(settings, grid) == "fixed" {
481
- @media only screen and ( max-width: (calc-breakpoint(to, nth($key, 3), get-index(nth($key, 3)))) ) {
487
+ @media only screen and ( max-width: (calc-breakpoint(alt-from, nth($key, 3), get-index(nth($key, 3)))) ) {
482
488
  @content;
483
489
  }
484
490
  }
485
491
 
486
492
  // (y)px less than key-x breakpoint
487
493
  } @else if length($key) > 1 and nth($key, 2) == "less" and nth($key, 3) == "than" {
488
- @media only screen and ( max-width: (calc-breakpoint(to, nth($key, 4), get-index(nth($key, 4))) - nth($key, 1)) ) {
489
- @content;
494
+ @if get-value(settings, grid) == "fluid" {
495
+ @media only screen and ( max-width: (calc-breakpoint(to, nth($key, 4), get-index(nth($key, 4))) - nth($key, 1)) ) {
496
+ @content;
497
+ }
498
+ } @else if get-value(settings, grid) == "fixed" {
499
+ @media only screen and ( max-width: (calc-breakpoint(alt-to, nth($key, 4), get-index(nth($key, 4))) - nth($key, 1)) ) {
500
+ @content;
501
+ }
490
502
  }
491
503
 
492
504
  // for key-x key-y key-z
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flint-gs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Gabrielse