edge_framework 1.4.1 → 2.0.0.a

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.
@@ -26,12 +26,15 @@ $column-gutter : 20px !default;
26
26
  @mixin base-row(
27
27
  $nest : false,
28
28
  $collapse : false,
29
+ $gutter : 0,
30
+ $width : 0,
29
31
  $for-base : false) {
30
-
31
- $width : $row-max-width;
32
- $gutter : $column-gutter;
32
+
33
+ @if $gutter == 0 { $gutter: $column-gutter; }
34
+ @if $width == 0 { $width : $row-max-width; }
33
35
 
34
36
  @if $for-base {
37
+ display: block;
35
38
  margin: 0 auto;
36
39
  width: 100%;
37
40
  max-width: $width + $gutter;
@@ -79,10 +82,8 @@ $column-gutter : 20px !default;
79
82
  }
80
83
  // Only collapsed
81
84
  @else if $collapse {
82
- margin: 0 auto;
83
85
  padding-right: $gutter / 2;
84
86
  padding-left: $gutter / 2;
85
- width: 100%;
86
87
  }
87
88
  }
88
89
 
@@ -96,34 +97,45 @@ $column-gutter : 20px !default;
96
97
  $width : 0px,
97
98
  $collapse : false) {
98
99
 
99
- // Nested row, only output if gutter is specified
100
+ // if $gutter is passed
100
101
  @if $gutter > 0 {
101
- .row & {
102
+ // row needs the negative margin only if nested
103
+ h-row &,
104
+ h-row {
102
105
  margin-right: -($gutter / 2);
103
106
  margin-left: -($gutter / 2);
104
- min-width: 0;
105
107
  }
106
- } @else {
107
- .row & {
108
- min-width: 0;
108
+
109
+ h-column {
110
+ padding-right: $gutter / 2;
111
+ padding-left: $gutter / 2;
109
112
  }
110
113
  }
111
-
112
- // Set default value if 0
113
- @if $width == 0px { $width: $row-max-width; }
114
- @if $gutter == 0 { $gutter: $column-gutter; }
115
-
116
- // Max width for outer row
117
- max-width: $width + $gutter;
118
114
 
119
- @if not $responsive {
120
- min-width: $width + $gutter;
121
- }
115
+ // if either $gutter or $width is passed, recalculate max-width
116
+ @if $gutter > 0 or $width > 0 {
117
+ @if $width == 0px { $width: $row-max-width; }
118
+ @if $gutter == 0 { $gutter: $column-gutter; }
119
+
120
+ // max width for most outer row
121
+ max-width: $width + $gutter;
122
122
 
123
- // Collapsed behavior
123
+ // fixed width if not responsive
124
+ @if not $responsive {
125
+ min-width: $width + $gutter;
126
+ }
127
+ }
128
+
129
+ // collapsed behavior
124
130
  @if $collapse {
131
+ @if $gutter == 0 { $gutter: $column-gutter; }
132
+
125
133
  padding-right: $gutter / 2;
126
134
  padding-left: $gutter / 2;
135
+
136
+ > h-column {
137
+ @include column($collapse: true);
138
+ }
127
139
  }
128
140
  }
129
141
 
@@ -135,8 +147,6 @@ $column-gutter : 20px !default;
135
147
  @mixin base-column(
136
148
  $size : 0,
137
149
  $offset : null,
138
- $push : 0,
139
- $pull : 0,
140
150
  $collapse : false,
141
151
  $centered : null,
142
152
  $gutter : 0px,
@@ -144,7 +154,7 @@ $column-gutter : 20px !default;
144
154
  $for-base : false) {
145
155
 
146
156
  @if $for-base {
147
- position: relative;
157
+ display: block;
148
158
  float: $default-float;
149
159
  padding-right: $column-gutter / 2;
150
160
  padding-left: $column-gutter / 2;
@@ -182,17 +192,6 @@ $column-gutter : 20px !default;
182
192
  margin-right: 0;
183
193
  margin-left: 0;
184
194
  }
185
-
186
- // Source Ordering
187
- @if $push > 0 {
188
- #{$default-float}: gridCalc($push, $total);
189
- #{$default-opposite}: auto;
190
- }
191
-
192
- @if $pull > 0 {
193
- #{$default-opposite}: gridCalc($pull, $total);
194
- #{$default-float}: auto;
195
- }
196
195
  }
197
196
 
198
197
  // -----------------------------------
@@ -205,8 +204,6 @@ $column-gutter : 20px !default;
205
204
  $small : 0,
206
205
  $mini : 0,
207
206
  $offset : null,
208
- $push : 0,
209
- $pull : 0,
210
207
  $collapse : false,
211
208
  $centered : null,
212
209
  $gutter : 0px,
@@ -214,21 +211,21 @@ $column-gutter : 20px !default;
214
211
 
215
212
  // Sizing
216
213
  @if $size > 0 {
217
- @include base-column($size:$size, $total:$total);
214
+ @include base-column($size, $total:$total);
218
215
 
219
216
  @if $small > 0 {
220
217
  @include below(small) {
221
- @include base-column($size:$small, $total:$total);
218
+ @include base-column($small, $total:$total);
222
219
  }
223
- } @else if $responsive and not $is-in-media { // else, become 100% width on small screen (if responsive)
220
+ } @else if $responsive and not $in-media { // else, become 100% width on small screen (if responsive)
224
221
  @include below(small) {
225
- @include base-column($size:$total, $total:$total);
222
+ @include base-column($total, $total:$total);
226
223
  }
227
224
  }
228
225
 
229
226
  @if $mini > 0 {
230
227
  @include below(mini) {
231
- @include base-column($size:$mini, $total:$total);
228
+ @include base-column($mini, $total:$total);
232
229
  }
233
230
  }
234
231
  }
@@ -242,13 +239,13 @@ $column-gutter : 20px !default;
242
239
  );
243
240
 
244
241
  // Source Ordering, follow base column
245
- @if $responsive and not $is-in-media {
242
+ @if $responsive and not $in-media {
246
243
  // make Offset not inherited in small screen
247
244
  @include above(small) {
248
- @include base-column($offset:$offset, $pull:$pull, $push:$push, $total:$total);
245
+ @include base-column($offset:$offset, $total:$total);
249
246
  }
250
247
  } @else {
251
- @include base-column($offset:$offset, $pull:$pull, $push:$push, $total:$total);
248
+ @include base-column($offset:$offset, $total:$total);
252
249
  }
253
250
  }
254
251
 
@@ -276,21 +273,23 @@ $column-gutter : 20px !default;
276
273
  }
277
274
  }
278
275
 
279
- // ---------------------
280
- // SOURCE ORDERING
281
- // ---------------------
282
- @mixin source-ordering() {
276
+ // -------------
277
+ // Sizing
278
+ // -------------
279
+
280
+ @mixin h-sizing($name) {
281
+ // Large sizing
282
+ @for $i from 1 through $total-columns {
283
+ .#{$name}-#{$i} { @include base-column($i); }
284
+ }
285
+ }
286
+
287
+ // ---------------
288
+ // Offset
289
+ // ---------------
290
+ @mixin h-offset($name) {
283
291
  @for $i from 1 through $total-columns - 1 {
284
- .large-offset-#{$i},
285
- .offset-#{$i} {
286
- @include base-column($offset:$i);
287
- }
288
- .push#{-$i} {
289
- @include base-column($push:$i);
290
- }
291
- .pull#{-$i} {
292
- @include base-column($pull:$i);
293
- }
292
+ .#{$name}-#{$i} { @include base-column($offset:$i); }
294
293
  }
295
294
  }
296
295
 
@@ -306,89 +305,66 @@ $column-gutter : 20px !default;
306
305
  }
307
306
  }
308
307
 
309
- // Normal row
310
- .row {
308
+ // normal row
309
+ h-row {
311
310
  @include base-row($for-base:true);
312
311
 
313
- // Collapsed row
314
- &.collapse {
315
- @include base-row($collapse:true);
316
-
317
- .row {
318
- @include base-row($nest:true, $collapse:true);
319
- }
320
-
321
- .column,
322
- .columns {
323
- @include base-column($collapse:true);
324
- }
325
- }
326
-
327
- // Nested-collapsed row
328
- .row {
312
+ // nested row
313
+ h-row {
329
314
  @include base-row($nest:true);
315
+
316
+ // collapsed nested row
330
317
  &.collapse {
331
318
  @include base-row($nest:true, $collapse:true);
332
319
  }
333
320
  }
334
321
  }
335
322
 
336
- // Normal column
337
- .column,
338
- .columns {
339
- @include base-column($size:$total-columns, $for-base:true);
340
- }
341
-
342
- // Large sizing
343
- @for $i from 1 through $total-columns {
344
- .large#{-$i} { @include base-column($size:$i); }
323
+ // normal column
324
+ h-column {
325
+ @include base-column($total-columns, $for-base:true);
345
326
  }
346
327
 
347
- // Centered column
348
- .column.large-centered,
349
- .columns.large-centered,
350
- .column.centered,
351
- .columns.centered {
352
- @include base-column($centered:true);
353
- }
328
+ // collapsed row
329
+ .collapse {
330
+ @include base-row($collapse:true);
331
+
332
+ // nested row inside collapsed
333
+ h-row {
334
+ @include base-row($nest:true);
335
+ }
354
336
 
355
- @if $responsive {
356
- @include above(small) {
357
- @include source-ordering();
337
+ > h-column {
338
+ @include base-column($collapse:true);
358
339
  }
359
340
  }
360
- // Remove media query so when the window scaled down, the styling isn't gone.
361
- @else {
362
- @include source-ordering();
363
- }
364
341
 
342
+ @include h-sizing("large");
365
343
 
366
- // Small screen and below
367
344
  @if $responsive {
368
-
369
- @include below(small) {
370
- .column,
371
- .columns {
372
- @include base-column($size:$total-columns);
373
- }
374
- @for $i from 1 through $total-columns {
375
- .small#{-$i} {
376
- @include base-column($size:$i);
377
- }
378
- }
345
+ @include above(small) { @include h-offset("offset"); }
346
+ } @else {
347
+ // Not inside media query. So when it reach the breakpoint, the offset isn't gone.
348
+ @include h-offset("offset");
349
+ }
379
350
 
380
- @for $i from 0 through $total-columns - 2 {
381
- .small-offset-#{$i} {
382
- @include base-column($offset:$i);
383
- }
384
- }
351
+ // centered column
352
+ .centered {
353
+ @include base-column($centered:true);
354
+ }
385
355
 
386
- .column.small-centered,
387
- .columns.small-centered {
388
- @include base-column($centered:true);
389
- }
356
+ // small screen and below
357
+ @include below(small) {
358
+ [class^="large-"] {
359
+ @include base-column($total-columns);
390
360
  }
361
+
362
+ @include h-sizing("small");
363
+ @include h-offset("small-offset");
391
364
 
392
- } // responsive
365
+ .small-centered {
366
+ @include base-column($centered:true);
367
+ }
368
+ }
393
369
 
394
370
  } // $include-grid
@@ -145,7 +145,8 @@ fieldset {
145
145
 
146
146
  legend { border: 0; padding: 0; }
147
147
  button, input, select, textarea { font-family: inherit; font-size: 100%; margin: 0;}
148
- button, input { line-height: normal; }
148
+ button, input, label { line-height: normal; }
149
+ label { display: block; }
149
150
  button, select { text-transform: none; }
150
151
  button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; }
151
152
  button[disabled], html input[disabled] { cursor: default; }
@@ -153,6 +154,11 @@ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0
153
154
  input[type="search"] { -webkit-appearance: textfield; }
154
155
  input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
155
156
  button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
157
+ button:focus, input[type="submit"]:focus, input[type="reset"]:focus { outline: none; }
158
+
159
+ // Disable Chrome's datepicker
160
+ input::-webkit-calendar-picker-indicator{ display: none; }
161
+ input[type="date"]::-webkit-input-placeholder{ visibility: hidden !important; }
156
162
 
157
163
  // Allow only vertical resizing of textareas.
158
164
  textarea {
@@ -168,7 +174,6 @@ table {
168
174
  border-spacing: 0;
169
175
  }
170
176
 
171
-
172
177
  /* Miscellaneous useful HTML classes */
173
178
 
174
179
  .left { float: left !important; }
@@ -189,8 +194,8 @@ table {
189
194
  width: 1px !important;
190
195
  }
191
196
 
192
- .bold, b, strong { font-weight: 700 !important; }
193
- .italic, em { font-style: italic !important; }
197
+ .bold, b, strong { font-weight: 700; }
198
+ .italic, em { font-style: italic; }
194
199
 
195
200
  // Font smoothing, only works on Safari Webkit
196
201
  .antialiased { -webkit-font-smoothing: antialiased; }
@@ -8,7 +8,7 @@
8
8
  EDGE Print
9
9
  -------------- */
10
10
 
11
- @media only print {
11
+ @include print {
12
12
  * {
13
13
  background: transparent !important;
14
14
  color: #000 !important; // Black prints faster: h5bp.com/s
@@ -15,61 +15,57 @@ $tile-gutter : 15px !default;
15
15
  $gutter : 0,
16
16
  $collapse : false,
17
17
  $for-base : false,
18
- $reset-clearing : false) {
18
+ $clear : false) {
19
19
 
20
20
  @if $for-base {
21
21
  display: block;
22
- @include clearfix();
23
-
24
- > li {
25
- display: block;
26
- position: relative;
27
- float: $default-float;
28
- }
22
+ @include clearfix;
29
23
  }
30
24
 
31
25
  // Collapse, reduce all margin and padding to 0
32
26
  @if $collapse {
33
27
  margin-right: 0;
34
28
  margin-left: 0;
35
-
36
- > li {
37
- padding: 0;
38
- }
39
- }
40
-
41
- // if gutter is not specified, use the default gutter.
42
- @if $gutter == 0 and $for-base and not $collapse {
43
- $gutter: $tile-gutter;
44
29
  }
45
30
 
46
31
  @if $gutter > 0 {
47
32
  margin-right: -($gutter / 2);
48
33
  margin-left: -($gutter / 2);
34
+ }
49
35
 
50
- > li {
36
+ > h-ti {
37
+ @if $for-base {
38
+ display: block;
39
+ float: $default-float;
40
+ }
41
+
42
+ @if $collapse {
43
+ padding: 0;
44
+ }
45
+
46
+ @if $gutter > 0 {
51
47
  padding-right: ($gutter / 2);
52
48
  padding-left: ($gutter / 2);
53
49
  }
54
- }
55
50
 
56
- // Number of tiles per row
57
- @if $size > 0 {
58
- > li {
51
+ // Number of tiles per row
52
+ @if $size > 0 {
59
53
  width: 100% / $size;
60
54
 
61
- @if $reset-clearing {
55
+ // clear floating
56
+ @if $clear {
62
57
  &:nth-of-type(n) {
63
58
  clear: none;
64
59
  }
65
60
  }
61
+ }
66
62
 
63
+ @if $size > 1 {
67
64
  &:nth-of-type(#{$size}n+1) {
68
65
  clear: both;
69
66
  }
70
67
  }
71
68
  }
72
-
73
69
  }
74
70
 
75
71
  // -----------------------------------
@@ -88,23 +84,18 @@ $tile-gutter : 15px !default;
88
84
  $size: $size,
89
85
  $gutter: $gutter,
90
86
  $collapse: $collapse,
91
- $for-base: true,
92
- $reset-clearing: $is-in-media
87
+ $clear: $in-media
93
88
  );
94
89
 
95
90
  @if $small > 0 {
96
91
  @include below(small) {
97
- @include base-tile($size: $small, $reset-clearing: true);
98
- }
99
- } @else if $responsive and not $is-in-media { // else, become 100% width on small screen (if responsive)
100
- @include below(small) {
101
- @include base-tile($size: 1);
92
+ @include base-tile($small, $clear:true);
102
93
  }
103
94
  }
104
95
 
105
96
  @if $mini > 0 {
106
97
  @include below(mini) {
107
- @include base-tile($size: $mini, $reset-clearing: true);
98
+ @include base-tile($mini, $clear:true);
108
99
  }
109
100
  }
110
101
  }
@@ -115,37 +106,32 @@ $tile-gutter : 15px !default;
115
106
  EDGE Tile
116
107
  -------------- */
117
108
 
118
- [class*="tile-"] {
119
- @include base-tile($for-base: true);
120
-
109
+ h-tile {
110
+ @include base-tile($gutter:$tile-gutter, $for-base:true);
111
+
121
112
  &.collapse {
122
113
  @include base-tile($collapse:true);
123
114
  }
124
115
  }
125
116
 
126
117
  @for $i from 1 through $max-tiles {
127
- .large-tile-#{$i},
128
- .tile-#{$i} {
129
- @include base-tile($size:$i);
118
+ .block-#{$i} {
119
+ @include base-tile($i);
130
120
  }
131
121
  }
132
122
 
133
- @if $responsive {
134
- @include below(small) {
135
- // Make large-tile 100% width
136
- [class*="tile-"] > li {
137
- width: 100%;
138
- }
139
- [class*="small-tile-"] > li:nth-child(n) {
140
- clear: none;
141
- }
142
- @for $i from 1 through $max-tiles {
143
- .small-tile-#{$i} {
144
- @include base-tile($size:$i);
145
- }
123
+ @include below(small) {
124
+ // Make large-tile 100% width
125
+ [class^="block-"] {
126
+ @include base-tile(1, $clear:true);
127
+ }
128
+
129
+ @for $i from 1 through $max-tiles {
130
+ .small-block-#{$i} {
131
+ @include base-tile($i);
146
132
  }
147
133
  }
148
- } // responsive
134
+ }
149
135
 
150
136
 
151
137
 
@@ -125,7 +125,6 @@ a {
125
125
  color: $link-color;
126
126
  }
127
127
 
128
-
129
128
  h1 { font-size: em($h1-font-size); }
130
129
  h2 { font-size: em($h2-font-size); }
131
130
  h3 { font-size: em($h3-font-size); }