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
@@ -32,15 +32,9 @@ select {
32
32
  line-height: $input-line-height;
33
33
  margin: 0.2em 0;
34
34
  max-width: $input-max-width;
35
- outline: none;
36
35
  padding: $input-padding-vertical 0.7em;
37
36
  width: 100%;
38
37
 
39
- &:focus,
40
- &.usa-input-focus {
41
- box-shadow: $focus-shadow;
42
- }
43
-
44
38
  &.usa-input-success {
45
39
  border: 3px solid $color-green-light;
46
40
  }
@@ -94,7 +88,12 @@ select {
94
88
 
95
89
  .usa-input-required:after {
96
90
  color: $color-secondary-darkest;
97
- content: ' (*Required)';
91
+ content: ' (*required)';
92
+ }
93
+
94
+ .usa-input-optional:after {
95
+ color: $color-gray-medium;
96
+ content: ' (optional)';
98
97
  }
99
98
 
100
99
  label {
@@ -112,11 +111,31 @@ select {
112
111
  -webkit-appearance: none;
113
112
  appearance: none;
114
113
  background-color: $color-white;
115
- background-image: url('#{$image-path}/arrow-down.png');
116
- background-image: url('#{$image-path}/arrow-down.svg');
114
+ background-image: url('#{$image-path}/arrow-both.png');
115
+ background-image: url('#{$image-path}/arrow-both.svg');
117
116
  background-position: right 1.3rem center;
118
117
  background-repeat: no-repeat;
119
- background-size: 1.3rem;
118
+ background-size: 1rem;
119
+ padding-right: 3rem;
120
+
121
+ &::-ms-expand {
122
+ display: none;
123
+ }
124
+
125
+ // Show default webkit style on select element when autofilled to show icon
126
+ &:-webkit-autofill {
127
+ appearance: menulist;
128
+ }
129
+
130
+ // Remove dotted outline from select element on focus in Firefox
131
+ &:-moz-focusring {
132
+ color: transparent;
133
+ text-shadow: 0 0 0 $color-black;
134
+ }
135
+ }
136
+
137
+ option:first-child {
138
+ font-weight: $font-bold;
120
139
  }
121
140
 
122
141
  legend {
@@ -159,30 +178,31 @@ legend {
159
178
  [type=radio] + label {
160
179
  cursor: pointer;
161
180
  font-weight: 400;
162
- margin-bottom: 0.5em;
181
+ margin-bottom: 0.65em;
163
182
  }
164
183
 
165
184
  [type=checkbox] + label::before,
166
185
  [type=radio] + label::before {
167
186
  background: $color-white;
168
- border-radius: $border-radius;
187
+ border-radius: $checkbox-border-radius;
169
188
  box-shadow: 0 0 0 1px $color-gray-medium;
170
189
  content: '\a0';
171
190
  display: inline-block;
172
- height: 1.8rem;
173
- line-height: 1.8rem;
191
+ height: $spacing-medium;
192
+ line-height: $spacing-medium;
174
193
  margin-right: 0.6em;
175
194
  text-indent: 0.15em;
176
195
  vertical-align: middle\0; // Target IE 11 and below to vertically center inputs
177
- width: 1.8rem;
196
+ width: $spacing-medium;
178
197
  }
179
198
 
180
199
  [type=radio] + label::before {
181
- box-shadow: 0 0 0 2px $color-white, 0 0 0 3px $color-gray-medium;
182
- height: 1.6rem;
183
- line-height: 1.6rem;
184
- width: 1.6rem;
185
200
  border-radius: 100%;
201
+ box-shadow: 0 0 0 2px $color-white, 0 0 0 3px $color-gray-medium;
202
+ height: 1.4rem; // Size overrides to account for shape + checked styling
203
+ line-height: 1.4rem;
204
+ margin-right: 0.75em;
205
+ width: 1.4rem;
186
206
  }
187
207
 
188
208
  [type=checkbox]:checked + label::before,
@@ -195,10 +215,6 @@ legend {
195
215
  box-shadow: 0 0 0 2px $color-white, 0 0 0 4px $color-primary;
196
216
  }
197
217
 
198
- [type=radio]:focus + label::before {
199
- box-shadow: 0 0 0 2px $color-white, 0 0 0 4px $color-primary, 0 0 3px 4px $color-focus, 0 0 7px 4px $color-focus;
200
- }
201
-
202
218
  [type=checkbox]:checked + label::before,
203
219
  [type=checkbox]:checked:disabled + label::before {
204
220
  background-image: url('#{$image-path}/correct8.png');
@@ -207,17 +223,23 @@ legend {
207
223
  background-repeat: no-repeat;
208
224
  }
209
225
 
210
- [type=checkbox]:focus + label::before {
211
- box-shadow: 0 0 0 1px $color-white, 0 0 0 3px $color-primary;
226
+ [type=radio]:focus + label::before {
227
+ outline: $focus-outline;
228
+ outline-offset: $focus-spacing * 2; // Double the offset to account for circular shape
212
229
  }
213
230
 
214
231
  [type=checkbox]:disabled + label {
215
- color: $color-gray;
232
+ color: $color-gray-lighter;
233
+ }
234
+
235
+ [type=checkbox]:focus + label::before {
236
+ outline: $focus-outline;
237
+ outline-offset: $focus-spacing;
216
238
  }
217
239
 
218
240
  [type=checkbox]:disabled + label::before,
219
241
  [type=radio]:disabled + label::before {
220
- background: $color-gray-lighter;
242
+ background: $color-gray-lightest;
221
243
  box-shadow: 0 0 0 1px $color-gray-light;
222
244
  cursor: not-allowed;
223
245
  }
@@ -231,11 +253,6 @@ legend {
231
253
  width: 100%;
232
254
  }
233
255
 
234
- [type=range]:focus {
235
- box-shadow: none;
236
- outline: none;
237
- }
238
-
239
256
  [type=range]::-webkit-slider-runnable-track {
240
257
  background: $color-gray-light;
241
258
  border: 1px solid $color-gray-medium;
@@ -301,18 +318,6 @@ legend {
301
318
  border-radius: 2rem;
302
319
  }
303
320
 
304
- [type=range]:focus::-webkit-slider-thumb {
305
- border: 2px solid $color-focus;
306
- }
307
-
308
- [type=range]:focus::-moz-range-thumb {
309
- border: 2px solid $color-focus;
310
- }
311
-
312
- [type=range]:focus::-ms-thumb {
313
- border: 2px solid $color-focus;
314
- }
315
-
316
321
  // Memorable dates
317
322
 
318
323
  .usa-date-of-birth {
@@ -1,6 +1,6 @@
1
1
  .usa-label {
2
- background-color: $color-primary;
3
- border-radius: $border-radius;
2
+ background-color: $color-gray;
3
+ border-radius: $label-border-radius;
4
4
  color: $color-white;
5
5
  font-size: $h5-font-size;
6
6
  margin-right: 0.5rem;
@@ -1,40 +1,35 @@
1
1
  table {
2
2
  border-spacing: 0;
3
3
  margin: 2em 0;
4
- min-width: 100%;
5
-
6
- thead {
7
- th,
8
- td {
9
- background-color: $color-gray-lightest;
10
- }
11
- }
4
+ }
12
5
 
6
+ thead {
13
7
  th {
14
- text-align: left;
15
- }
16
-
17
- tbody {
18
- th {
19
- font-weight: $font-normal;
20
- }
8
+ font-weight: $font-bold;
21
9
  }
22
10
 
23
11
  th,
24
12
  td {
25
- background-color: $color-white;
26
- border: 1px solid $color-gray;
27
- padding: 1.5rem;
13
+ background-color: $color-gray-lightest;
28
14
  }
29
15
  }
30
16
 
17
+ th {
18
+ text-align: left;
19
+ }
20
+
21
+ th,
22
+ td {
23
+ background-color: $color-white;
24
+ border: 1px solid $color-gray;
25
+ font-weight: $font-normal;
26
+ padding: 1rem 1.5rem;
27
+ }
28
+
31
29
  .usa-table-borderless {
32
30
  thead {
33
- tr {
34
- background-color: transparent;
35
- }
36
-
37
31
  th {
32
+ background-color: transparent;
38
33
  border-top: 0;
39
34
  }
40
35
  }
@@ -44,4 +39,17 @@ table {
44
39
  border-left: 0;
45
40
  border-right: 0;
46
41
  }
42
+
43
+ th {
44
+ &:first-child {
45
+ padding-left: 0;
46
+ }
47
+ }
48
+ }
49
+
50
+ caption {
51
+ @include h5;
52
+ font-family: $font-serif;
53
+ margin-bottom: 1.2rem;
54
+ text-align: left;
47
55
  }
@@ -22,13 +22,12 @@ a {
22
22
  color: $color-primary-darker;
23
23
  }
24
24
 
25
- &:visited {
26
- color: $color-visited;
25
+ &:focus {
26
+ @include focus;
27
27
  }
28
28
 
29
- &:focus {
30
- box-shadow: $focus-shadow;
31
- outline: 0;
29
+ &:visited {
30
+ color: $color-visited;
32
31
  }
33
32
  }
34
33
 
@@ -67,8 +66,7 @@ h1,
67
66
  h2,
68
67
  h3,
69
68
  h4,
70
- h5,
71
- h6 {
69
+ h5 {
72
70
  clear: both;
73
71
  font-family: $font-serif;
74
72
  line-height: $heading-line-height;
@@ -76,6 +74,10 @@ h6 {
76
74
  margin-top: 1.5em;
77
75
  }
78
76
 
77
+ h6 {
78
+ font-family: $font-sans;
79
+ }
80
+
79
81
  h1 {
80
82
  @include h1();
81
83
  }
@@ -112,7 +114,7 @@ dfn {
112
114
  // Custom typography
113
115
 
114
116
  .usa-content {
115
- p:not(.usa-font-lead),
117
+ p,
116
118
  ul:not(.usa-accordion):not(.usa-accordion-bordered),
117
119
  ol:not(.usa-accordion):not(.usa-accordion-bordered) {
118
120
  max-width: $text-max-width;
@@ -162,6 +164,7 @@ dfn {
162
164
  .usa-font-lead {
163
165
  font-family: $font-serif;
164
166
  font-size: $lead-font-size;
167
+ font-weight: $font-normal;
165
168
  line-height: $lead-line-height;
166
169
  max-width: $lead-max-width;
167
170
  }
@@ -8,9 +8,9 @@
8
8
  // Core -------------- //
9
9
  @import 'core/variables';
10
10
  @import 'core/fonts';
11
- @import 'core/base';
12
11
  @import 'core/grid';
13
12
  @import 'core/utilities';
13
+ @import 'core/base';
14
14
 
15
15
  // Elements -------------- //
16
16
  // Styles basic HTML elements
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uswds-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shawn Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2017-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -61,6 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - LICENSE.md
63
63
  - README.md
64
+ - _includes/analytics.html
64
65
  - _includes/banner.html
65
66
  - _includes/components/banner.html
66
67
  - _includes/components/footer.html
@@ -274,11 +275,15 @@ files:
274
275
  - assets/uswds/img/angle-arrow-up-primary-hover.svg
275
276
  - assets/uswds/img/angle-arrow-up-primary.png
276
277
  - assets/uswds/img/angle-arrow-up-primary.svg
278
+ - assets/uswds/img/arrow-both.png
279
+ - assets/uswds/img/arrow-both.svg
277
280
  - assets/uswds/img/arrow-down.png
278
281
  - assets/uswds/img/arrow-down.svg
279
282
  - assets/uswds/img/arrow-right.png
280
283
  - assets/uswds/img/arrow-right.svg
281
284
  - assets/uswds/img/circle-124.png
285
+ - assets/uswds/img/close-primary.png
286
+ - assets/uswds/img/close-primary.svg
282
287
  - assets/uswds/img/close.png
283
288
  - assets/uswds/img/close.svg
284
289
  - assets/uswds/img/correct8.png
@@ -316,6 +321,8 @@ files:
316
321
  - assets/uswds/img/plus.svg
317
322
  - assets/uswds/img/search-alt.png
318
323
  - assets/uswds/img/search-alt.svg
324
+ - assets/uswds/img/search-primary.png
325
+ - assets/uswds/img/search-primary.svg
319
326
  - assets/uswds/img/search.png
320
327
  - assets/uswds/img/search.svg
321
328
  - assets/uswds/img/social-icons/png/facebook25.png
@@ -463,7 +470,7 @@ files:
463
470
  - assets/uswds/scss/lib/settings/_px-to-em.scss
464
471
  - assets/uswds/scss/lib/settings/_visual-grid.scss
465
472
  - assets/uswds/scss/uswds.scss
466
- - assets/uswds/uswds-1.3.1.zip
473
+ - assets/uswds/uswds-1.4.3.zip
467
474
  homepage: https://standards.usa.gov/
468
475
  licenses:
469
476
  - CC0-1.0
@@ -484,7 +491,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
484
491
  version: '0'
485
492
  requirements: []
486
493
  rubyforge_project:
487
- rubygems_version: 2.6.10
494
+ rubygems_version: 2.6.3
488
495
  signing_key:
489
496
  specification_version: 4
490
497
  summary: A Jekyll theme for the U.S. Web Design Standards