uswds-jekyll 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -3
  3. data/_includes/analytics.html +20 -0
  4. data/_includes/components/header--basic.html +2 -2
  5. data/_includes/components/header--extended.html +3 -3
  6. data/_includes/components/hero.html +1 -1
  7. data/_includes/subnav.html +1 -1
  8. data/_layouts/default.html +3 -0
  9. data/_sass/uswds/components/_accordions.scss +11 -11
  10. data/_sass/uswds/components/_alerts.scss +60 -29
  11. data/_sass/uswds/components/_footer.scss +176 -40
  12. data/_sass/uswds/components/_header.scss +6 -9
  13. data/_sass/uswds/components/_hero.scss +1 -7
  14. data/_sass/uswds/components/_navigation.scss +115 -20
  15. data/_sass/uswds/components/_search.scss +32 -27
  16. data/_sass/uswds/core/_base.scss +5 -0
  17. data/_sass/uswds/core/_utilities.scss +25 -5
  18. data/_sass/uswds/core/_variables.scss +77 -45
  19. data/_sass/uswds/elements/_buttons.scss +76 -50
  20. data/_sass/uswds/elements/_inputs.scss +49 -44
  21. data/_sass/uswds/elements/_labels.scss +2 -2
  22. data/_sass/uswds/elements/_table.scss +30 -22
  23. data/_sass/uswds/elements/_typography.scss +11 -8
  24. data/_sass/uswds/uswds.scss +1 -1
  25. data/assets/uswds/CONTRIBUTING.md +33 -0
  26. data/assets/uswds/LICENSE.md +0 -8
  27. data/assets/uswds/README.md +2 -2
  28. data/assets/uswds/css/uswds.css +862 -476
  29. data/assets/uswds/css/uswds.min.css +2 -2
  30. data/assets/uswds/css/uswds.min.css.map +1 -1
  31. data/assets/uswds/img/arrow-both.png +0 -0
  32. data/assets/uswds/img/arrow-both.svg +1 -0
  33. data/assets/uswds/img/close-primary.png +0 -0
  34. data/assets/uswds/img/close-primary.svg +16 -0
  35. data/assets/uswds/img/close.png +0 -0
  36. data/assets/uswds/img/close.svg +12 -1
  37. data/assets/uswds/img/search-primary.png +0 -0
  38. data/assets/uswds/img/search-primary.svg +12 -0
  39. data/assets/uswds/js/uswds.js +45 -13
  40. data/assets/uswds/js/uswds.min.js +1 -1
  41. data/assets/uswds/js/uswds.min.js.map +1 -1
  42. data/assets/uswds/scss/components/_accordions.scss +11 -11
  43. data/assets/uswds/scss/components/_alerts.scss +60 -29
  44. data/assets/uswds/scss/components/_footer.scss +176 -40
  45. data/assets/uswds/scss/components/_header.scss +6 -9
  46. data/assets/uswds/scss/components/_hero.scss +1 -7
  47. data/assets/uswds/scss/components/_navigation.scss +115 -20
  48. data/assets/uswds/scss/components/_search.scss +32 -27
  49. data/assets/uswds/scss/core/_base.scss +5 -0
  50. data/assets/uswds/scss/core/_utilities.scss +25 -5
  51. data/assets/uswds/scss/core/_variables.scss +77 -45
  52. data/assets/uswds/scss/elements/_buttons.scss +76 -50
  53. data/assets/uswds/scss/elements/_inputs.scss +49 -44
  54. data/assets/uswds/scss/elements/_labels.scss +2 -2
  55. data/assets/uswds/scss/elements/_table.scss +30 -22
  56. data/assets/uswds/scss/elements/_typography.scss +11 -8
  57. data/assets/uswds/scss/uswds.scss +1 -1
  58. data/assets/uswds/{uswds-1.3.1.zip → uswds-1.4.3.zip} +0 -0
  59. metadata +11 -4
@@ -15,7 +15,7 @@ $z-index-nav: 9000;
15
15
  z-index: $z-index-header;
16
16
 
17
17
  @include media($nav-width) {
18
- border-bottom: 1px solid $color-gray-light;
18
+ border-bottom: 1px solid $color-gray-lighter;
19
19
  }
20
20
 
21
21
  a {
@@ -23,11 +23,8 @@ $z-index-nav: 9000;
23
23
  }
24
24
 
25
25
  .usa-search {
26
- margin-bottom: 1.5rem;
27
-
28
26
  @include media($nav-width) {
29
27
  float: right;
30
- margin-bottom: 0;
31
28
  max-width: 21.5rem;
32
29
  }
33
30
  }
@@ -120,7 +117,7 @@ $z-index-nav: 9000;
120
117
  .usa-header-basic {
121
118
  .usa-logo {
122
119
  @include media($nav-width) {
123
- bottom: 1.9rem;
120
+ bottom: 0;
124
121
  position: absolute;
125
122
  }
126
123
  }
@@ -167,7 +164,7 @@ $z-index-nav: 9000;
167
164
 
168
165
  .usa-nav {
169
166
  @include media($nav-width) {
170
- border-top: 1px solid $color-gray-light;
167
+ border-top: 1px solid $color-gray-lighter;
171
168
  float: none;
172
169
  padding: 0;
173
170
  width: 100%;
@@ -177,7 +174,7 @@ $z-index-nav: 9000;
177
174
  .usa-nav-inner {
178
175
  @include media($nav-width) {
179
176
  @include outer-container();
180
- @include padding(null $site-margins null 2rem);
177
+ @include padding(null $site-margins null 1.5rem);
181
178
  margin-top: -1px;
182
179
  max-width: $site-max-width;
183
180
  position: relative;
@@ -193,7 +190,7 @@ $z-index-nav: 9000;
193
190
  &[aria-expanded=false],
194
191
  &[aria-expanded=true] { /* stylelint-disable-line selector-no-qualifying-type */
195
192
  @include media($nav-width) { /* stylelint-disable-line selector-no-qualifying-type */
196
- background-position: right 1.5rem top 50%;
193
+ background-position: right 1.5rem top 53%;
197
194
  }
198
195
  }
199
196
  }
@@ -201,7 +198,7 @@ $z-index-nav: 9000;
201
198
 
202
199
  .usa-nav-link {
203
200
  @include media($nav-width) {
204
- padding-top: 1.9rem;
201
+ @include padding(1.8rem null);
205
202
  }
206
203
  }
207
204
 
@@ -27,13 +27,7 @@
27
27
  }
28
28
 
29
29
  > *:first-child {
30
- @include margin(0 null $site-margins null);
31
- }
32
-
33
- .usa-button {
34
- font-size: $small-font-size;
35
- margin-top: 7rem;
36
- width: 100%;
30
+ @include margin(0 null $spacing-medium null);
37
31
  }
38
32
  }
39
33
 
@@ -1,8 +1,13 @@
1
1
  // Header navigation ------------- //
2
2
 
3
3
  @mixin nav-border {
4
+ border-bottom: 0.4rem solid $color-primary;
5
+ padding-bottom: 0.6rem;
6
+ }
7
+
8
+ @mixin nav-border-thick {
4
9
  border-bottom: 0.7rem solid $color-primary;
5
- padding-bottom: 1rem;
10
+ padding-bottom: 0.9rem;
6
11
  }
7
12
 
8
13
  .usa-navbar {
@@ -12,7 +17,7 @@
12
17
  @include media($nav-width) {
13
18
  border-bottom: none;
14
19
  display: inline-block;
15
- height: 10.3rem; // XXX magic number
20
+ height: 7.8rem; // XXX magic number
16
21
  }
17
22
  }
18
23
 
@@ -26,6 +31,15 @@
26
31
  }
27
32
  }
28
33
  }
34
+
35
+ &.usa-accordion-button {
36
+ span {
37
+ @include media($nav-width) {
38
+ margin-right: 0;
39
+ padding-right: 1.5rem;
40
+ }
41
+ }
42
+ }
29
43
  }
30
44
 
31
45
  .usa-nav-container {
@@ -53,7 +67,7 @@
53
67
  z-index: $z-index-nav;
54
68
 
55
69
  @include media($nav-width) {
56
- @include padding(5rem 0 0 null);
70
+ @include padding(4.5rem 0 0 null);
57
71
  border-left: none;
58
72
  display: block;
59
73
  float: right;
@@ -82,6 +96,10 @@
82
96
  color: $color-primary;
83
97
  font-weight: $font-bold;
84
98
  padding-left: 1.4rem;
99
+
100
+ @include media($nav-width) {
101
+ color: $color-base;
102
+ }
85
103
  }
86
104
 
87
105
  .usa-button {
@@ -91,6 +109,7 @@
91
109
  .usa-search {
92
110
  @include media($nav-width) {
93
111
  margin-left: 1.5rem; // XXX magic number
112
+ top: 4px;
94
113
  }
95
114
  }
96
115
  }
@@ -99,6 +118,7 @@
99
118
 
100
119
  .usa-nav-primary {
101
120
  @include usa-sidenav-list;
121
+ margin-top: 1.5rem;
102
122
  order: 2;
103
123
 
104
124
  @include media($nav-width) {
@@ -121,11 +141,11 @@
121
141
 
122
142
  > a {
123
143
  @include media($nav-width) {
124
- @include padding(1.3rem 1.5rem 1.7rem 1.5rem);
144
+ @include padding(1.3rem 1.5rem 2.2rem 1.5rem);
125
145
  color: $color-gray;
126
146
  font-size: $h5-font-size;
127
147
  font-weight: $font-bold;
128
- line-height: 1.2;
148
+ line-height: 1;
129
149
  }
130
150
 
131
151
  &:hover {
@@ -136,25 +156,39 @@
136
156
  }
137
157
  }
138
158
 
159
+ a {
160
+ @include media($nav-width) {
161
+ @include padding(0.75rem null);
162
+ }
163
+
164
+ &:hover {
165
+ @include media($nav-width) {
166
+ // color: $color-base;
167
+ }
168
+ }
169
+ }
170
+
139
171
  button {
140
- $button-vertical-offset: 44%;
172
+ $button-vertical-offset: 40%;
141
173
 
142
174
  @include button-unstyled;
143
175
  @include font-smoothing;
144
176
  font-weight: $font-normal;
145
- padding: 1.4rem 1.5rem 1rem 1.8rem;
177
+ line-height: 1.3;
178
+ padding: 0.85rem 1.5rem 0.85rem 1.8rem;
146
179
 
147
180
  @include media($nav-width) {
148
- @include padding(null 3rem 1.9rem 1.5rem);
181
+ @include padding(1.3rem 1.5rem 2.2rem 1.5rem);
149
182
  color: $color-gray;
150
183
  font-size: $h5-font-size;
151
184
  font-weight: $font-bold;
185
+ line-height: 1;
152
186
  width: initial;
153
187
  }
154
188
 
155
189
  &:focus,
156
190
  &:active {
157
- box-shadow: $focus-shadow;
191
+ box-shadow: $focus-outline;
158
192
  }
159
193
 
160
194
  &:hover {
@@ -163,6 +197,7 @@
163
197
 
164
198
  @include media($nav-width) {
165
199
  background-color: transparent;
200
+ // color: $color-base;
166
201
  }
167
202
  }
168
203
 
@@ -178,6 +213,13 @@
178
213
  background-image: url('#{$image-path}/angle-arrow-down.svg');
179
214
  background-position: right 1.5rem top $button-vertical-offset;
180
215
  }
216
+
217
+ &:hover {
218
+ @include media($nav-width) {
219
+ background-image: url('#{$image-path}/angle-arrow-down-primary.png');
220
+ background-image: url('#{$image-path}/angle-arrow-down-primary.svg');
221
+ }
222
+ }
181
223
  }
182
224
 
183
225
  &[aria-expanded=true] { /* stylelint-disable-line selector-no-qualifying-type */
@@ -200,19 +242,60 @@
200
242
 
201
243
  span {
202
244
  @include nav-border;
245
+ color: $color-white;
203
246
  }
204
247
  }
205
248
  }
206
249
  }
207
250
 
208
251
  @include media($nav-width) {
209
- a.usa-current { // stylelint-disable-line selector-no-qualifying-type
252
+ a.usa-current,
253
+ .usa-current { // stylelint-disable-line selector-no-qualifying-type
210
254
  // undo the sidenav style
211
255
  border-left: 0;
212
256
  padding-left: 1.5rem;
213
257
 
258
+ &:hover {
259
+ span {
260
+ color: $color-primary;
261
+ }
262
+ }
263
+
214
264
  span {
215
265
  @include nav-border;
266
+ color: $color-base;
267
+ }
268
+ }
269
+ }
270
+ }
271
+
272
+ // Extended header navigation ------- //
273
+
274
+ .usa-header-extended {
275
+ .usa-nav-link {
276
+ &:hover {
277
+ span {
278
+ @include media($nav-width) {
279
+ @include nav-border-thick;
280
+ }
281
+ }
282
+ }
283
+ }
284
+
285
+ .usa-nav-primary {
286
+ button[aria-expanded=true] { /* stylelint-disable-line selector-no-qualifying-type */
287
+ span {
288
+ @include media($nav-width) {
289
+ @include nav-border-thick;
290
+ }
291
+ }
292
+ }
293
+
294
+ .usa-current {
295
+ @include media($nav-width) {
296
+ span {
297
+ @include nav-border-thick;
298
+ }
216
299
  }
217
300
  }
218
301
  }
@@ -221,37 +304,44 @@
221
304
  // Secondary navigation ----------- //
222
305
 
223
306
  .usa-nav-secondary {
307
+ margin-top: 1.5rem;
308
+
224
309
  @include media($nav-width) {
310
+ margin-top: 0;
225
311
  position: absolute;
226
312
  right: $site-margins;
227
313
  top: -5.7rem; // XXX magic number
228
314
  }
229
315
 
230
316
  .usa-search {
231
- @include margin(3rem null);
317
+ @include margin(1.5rem null 0 null);
232
318
 
233
319
  @include media($nav-width) {
234
- @include margin(-0.2rem null 0 0);
320
+ @include margin(-0.9rem null 0 0);
235
321
  float: left;
236
322
  }
237
323
  }
238
324
  }
239
325
 
240
326
  .usa-nav-secondary-links {
327
+ margin-top: 2.4rem;
328
+
241
329
  @include media($nav-width) {
242
330
  float: left;
331
+ margin-top: 0;
243
332
  }
244
333
 
245
334
  li {
246
335
  @include media($nav-width) {
247
336
  display: inline;
248
- padding-left: 1rem;
337
+ padding-left: 0.5rem;
249
338
  }
250
339
 
251
340
  &:not(:last-child)::after {
252
341
  @include media($nav-width) {
342
+ color: $color-gray-lighter;
253
343
  content: '|';
254
- padding-left: 1rem;
344
+ padding-left: 0.5rem;
255
345
  }
256
346
  }
257
347
  }
@@ -265,6 +355,7 @@
265
355
 
266
356
  &:hover {
267
357
  color: $color-primary;
358
+ text-decoration: underline;
268
359
  }
269
360
  }
270
361
 
@@ -301,14 +392,13 @@
301
392
  // Navigation submenu (dropdown and mega menu) ----- //
302
393
 
303
394
  .usa-nav-submenu {
304
- // @include usa-sidenav-sublist;
395
+ @include usa-sidenav-sublist;
305
396
 
306
397
  @include media($nav-width) {
307
398
  @include unstyled-list;
308
- @include padding(1.15rem null);
399
+ @include padding(0.75rem null 0.9rem null);
309
400
  background-color: $color-primary-darkest;
310
- min-width: 21.5rem;
311
- width: auto;
401
+ width: 21.5rem;
312
402
  position: absolute;
313
403
  }
314
404
 
@@ -326,6 +416,7 @@
326
416
  @include media($nav-width) {
327
417
  background-color: $color-primary-darkest;
328
418
  color: $color-white;
419
+ padding-left: 1.5rem;
329
420
  text-decoration: underline;
330
421
  }
331
422
  }
@@ -350,7 +441,7 @@
350
441
 
351
442
  .usa-nav-close {
352
443
  @include button-unstyled;
353
- @include margin(-1.2rem -1.5rem 2.4rem auto);
444
+ @include margin(-1.2rem -1.5rem 1.5rem auto);
354
445
  float: right;
355
446
  height: $hit-area;
356
447
  text-align: center;
@@ -363,6 +454,10 @@
363
454
  img {
364
455
  width: 1.3rem;
365
456
  }
457
+
458
+ + * {
459
+ clear: both;
460
+ }
366
461
  }
367
462
 
368
463
  .usa-mobile_nav-active {
@@ -422,7 +517,7 @@
422
517
  @include media($nav-width) {
423
518
  display: block;
424
519
  float: right;
425
- margin-top: -4.8rem;
520
+ margin-top: -3.8rem;
426
521
  }
427
522
  }
428
523
 
@@ -14,25 +14,6 @@ $usa-btn-big-width: 11.6rem;
14
14
  max-width: none;
15
15
  position: relative;
16
16
 
17
- [type=search],
18
- .usa-search-input {
19
- @include padding(0 null);
20
- -webkit-appearance: none;
21
- border-bottom-right-radius: 0;
22
- border-right: none;
23
- border-top-right-radius: 0;
24
- box-sizing: border-box;
25
- float: left;
26
- font-size: $small-font-size;
27
- height: 3.3rem;
28
- margin: 0;
29
- width: calc(100% - #{$usa-btn-small-width});
30
-
31
- @include media($small-screen) {
32
- width: calc(100% - #{$usa-btn-medium-width});
33
- }
34
- }
35
-
36
17
  [type=submit],
37
18
  .usa-search-submit {
38
19
  @include search-icon;
@@ -49,14 +30,6 @@ $usa-btn-big-width: 11.6rem;
49
30
  }
50
31
  }
51
32
 
52
- .usa-search-submit-text {
53
- display: none;
54
-
55
- @include media($small-screen) {
56
- display: block;
57
- }
58
- }
59
-
60
33
  &.usa-search-big {
61
34
  @include media($small-screen) {
62
35
  $height: 4.4rem;
@@ -104,3 +77,35 @@ $usa-btn-big-width: 11.6rem;
104
77
  }
105
78
  }
106
79
  }
80
+
81
+ // Extra specificity to override rules set in reset.css.
82
+ input[type=search] { /* stylelint-disable-line selector-no-qualifying-type */
83
+ box-sizing: border-box;
84
+ -webkit-appearance: none;
85
+ }
86
+
87
+ [type=search],
88
+ .usa-search-input {
89
+ @include padding(0 null);
90
+ border-bottom-right-radius: 0;
91
+ border-right: none;
92
+ border-top-right-radius: 0;
93
+ box-sizing: border-box;
94
+ float: left;
95
+ font-size: $small-font-size;
96
+ height: 3.3rem;
97
+ margin: 0;
98
+ width: calc(100% - #{$usa-btn-small-width});
99
+
100
+ @include media($small-screen) {
101
+ width: calc(100% - #{$usa-btn-medium-width});
102
+ }
103
+ }
104
+
105
+ .usa-search-submit-text {
106
+ @include sr-only;
107
+
108
+ @include media($small-screen) {
109
+ @include not-sr-only();
110
+ }
111
+ }