govuk_publishing_components 9.5.1 → 9.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +11 -6
  3. data/app/assets/javascripts/govuk_publishing_components/vendor/modernizr.js +3 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/admin_styles_ie8.scss +2 -0
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +2 -0
  6. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +7 -1
  7. data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +3 -5
  8. data/app/views/layouts/govuk_publishing_components/application.html.erb +6 -0
  9. data/config/initializers/assets.rb +2 -0
  10. data/lib/govuk_publishing_components/version.rb +1 -1
  11. data/node_modules/govuk-frontend/README.md +1 -1
  12. data/node_modules/govuk-frontend/all.js +3 -1
  13. data/node_modules/govuk-frontend/components/back-link/README.md +23 -7
  14. data/node_modules/govuk-frontend/components/breadcrumbs/README.md +26 -26
  15. data/node_modules/govuk-frontend/components/button/README.md +22 -22
  16. data/node_modules/govuk-frontend/components/checkboxes/README.md +115 -27
  17. data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +7 -1
  18. data/node_modules/govuk-frontend/components/date-input/README.md +141 -61
  19. data/node_modules/govuk-frontend/components/date-input/_date-input.scss +0 -5
  20. data/node_modules/govuk-frontend/components/date-input/template.njk +40 -17
  21. data/node_modules/govuk-frontend/components/details/README.md +10 -10
  22. data/node_modules/govuk-frontend/components/error-message/README.md +4 -4
  23. data/node_modules/govuk-frontend/components/error-summary/README.md +5 -5
  24. data/node_modules/govuk-frontend/components/fieldset/README.md +7 -7
  25. data/node_modules/govuk-frontend/components/file-upload/README.md +16 -16
  26. data/node_modules/govuk-frontend/components/footer/README.md +5 -5
  27. data/node_modules/govuk-frontend/components/footer/template.njk +1 -1
  28. data/node_modules/govuk-frontend/components/header/README.md +26 -18
  29. data/node_modules/govuk-frontend/components/header/_header.scss +3 -2
  30. data/node_modules/govuk-frontend/components/header/template.njk +5 -3
  31. data/node_modules/govuk-frontend/components/hint/README.md +14 -10
  32. data/node_modules/govuk-frontend/components/input/README.md +166 -30
  33. data/node_modules/govuk-frontend/components/input/_input.scss +20 -3
  34. data/node_modules/govuk-frontend/components/inset-text/README.md +6 -6
  35. data/node_modules/govuk-frontend/components/label/README.md +9 -9
  36. data/node_modules/govuk-frontend/components/panel/README.md +43 -4
  37. data/node_modules/govuk-frontend/components/panel/template.njk +4 -2
  38. data/node_modules/govuk-frontend/components/phase-banner/README.md +4 -4
  39. data/node_modules/govuk-frontend/components/phase-banner/_phase-banner.scss +3 -3
  40. data/node_modules/govuk-frontend/components/radios/README.md +100 -29
  41. data/node_modules/govuk-frontend/components/radios/_radios.scss +12 -3
  42. data/node_modules/govuk-frontend/components/select/README.md +12 -12
  43. data/node_modules/govuk-frontend/components/skip-link/README.md +4 -4
  44. data/node_modules/govuk-frontend/components/table/README.md +12 -12
  45. data/node_modules/govuk-frontend/components/table/_table.scss +2 -2
  46. data/node_modules/govuk-frontend/components/tabs/README.md +4 -4
  47. data/node_modules/govuk-frontend/components/tabs/_tabs.scss +1 -0
  48. data/node_modules/govuk-frontend/components/tag/README.md +7 -7
  49. data/node_modules/govuk-frontend/components/tag/_tag.scss +6 -0
  50. data/node_modules/govuk-frontend/components/textarea/README.md +16 -16
  51. data/node_modules/govuk-frontend/components/warning-text/README.md +4 -4
  52. data/node_modules/govuk-frontend/components/warning-text/_warning-text.scss +14 -4
  53. data/node_modules/govuk-frontend/core/_template.scss +7 -3
  54. data/node_modules/govuk-frontend/helpers/_typography.scss +44 -10
  55. data/node_modules/govuk-frontend/objects/_main-wrapper.scss +4 -0
  56. data/node_modules/govuk-frontend/package.json +18 -12
  57. data/node_modules/govuk-frontend/settings/_typography-responsive.scss +35 -0
  58. data/node_modules/govuk-frontend/tools/_all.scss +1 -0
  59. data/node_modules/govuk-frontend/tools/_px-to-rem.scss +20 -0
  60. data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +6 -0
  61. metadata +5 -28
  62. data/node_modules/govuk-frontend/components/back-link/back-link.njk +0 -3
  63. data/node_modules/govuk-frontend/components/breadcrumbs/breadcrumbs.njk +0 -14
  64. data/node_modules/govuk-frontend/components/button/button.njk +0 -3
  65. data/node_modules/govuk-frontend/components/checkboxes/checkboxes.njk +0 -27
  66. data/node_modules/govuk-frontend/components/date-input/date-input.njk +0 -23
  67. data/node_modules/govuk-frontend/components/details/details.njk +0 -7
  68. data/node_modules/govuk-frontend/components/error-message/error-message.njk +0 -7
  69. data/node_modules/govuk-frontend/components/error-summary/error-summary.njk +0 -17
  70. data/node_modules/govuk-frontend/components/fieldset/fieldset.njk +0 -13
  71. data/node_modules/govuk-frontend/components/file-upload/file-upload.njk +0 -9
  72. data/node_modules/govuk-frontend/components/footer/footer.njk +0 -3
  73. data/node_modules/govuk-frontend/components/header/header.njk +0 -3
  74. data/node_modules/govuk-frontend/components/hint/hint.njk +0 -7
  75. data/node_modules/govuk-frontend/components/input/input.njk +0 -9
  76. data/node_modules/govuk-frontend/components/inset-text/inset-text.njk +0 -7
  77. data/node_modules/govuk-frontend/components/label/label.njk +0 -6
  78. data/node_modules/govuk-frontend/components/panel/panel.njk +0 -7
  79. data/node_modules/govuk-frontend/components/phase-banner/phase-banner.njk +0 -7
  80. data/node_modules/govuk-frontend/components/radios/radios.njk +0 -27
  81. data/node_modules/govuk-frontend/components/select/select.njk +0 -24
  82. data/node_modules/govuk-frontend/components/skip-link/skip-link.njk +0 -3
  83. data/node_modules/govuk-frontend/components/table/table.njk +0 -45
  84. data/node_modules/govuk-frontend/components/tabs/tabs.njk +0 -3
  85. data/node_modules/govuk-frontend/components/tag/tag.njk +0 -7
  86. data/node_modules/govuk-frontend/components/textarea/textarea.njk +0 -11
  87. data/node_modules/govuk-frontend/components/warning-text/warning-text.njk +0 -9
@@ -34,6 +34,7 @@
34
34
  }
35
35
 
36
36
  .govuk-header__container {
37
+ @include govuk-clearfix;
37
38
  position: relative;
38
39
  margin-bottom: -$govuk-header-border-width;
39
40
  padding-top: govuk-spacing(2);
@@ -122,17 +123,17 @@
122
123
  padding-right: govuk-spacing(8);
123
124
 
124
125
  @include mq ($from: desktop) {
125
- display: inline-block;
126
126
  width: 33.33%;
127
127
  padding-right: 0;
128
+ float: left;
128
129
  vertical-align: top;
129
130
  }
130
131
  }
131
132
 
132
133
  .govuk-header__content {
133
134
  @include mq ($from: desktop) {
134
- display: inline-block;
135
135
  width: 66.66%;
136
+ float: left;
136
137
  }
137
138
  }
138
139
 
@@ -52,9 +52,11 @@
52
52
  </span>
53
53
  {% endif %}
54
54
  </a>
55
- </div><div class="govuk-header__content">
55
+ </div>
56
+ {% if params.serviceName or params.navigation %}
57
+ <div class="govuk-header__content">
56
58
 
57
- {% if (params.serviceName) %}
59
+ {% if params.serviceName %}
58
60
  <a href="{{ params.serviceUrl }}" class="govuk-header__link govuk-header__link--service-name">
59
61
  {{ params.serviceName }}
60
62
  </a>
@@ -76,7 +78,7 @@
76
78
  </ul>
77
79
  </nav>
78
80
  {% endif %}
79
-
80
81
  </div>
82
+ {% endif %}
81
83
  </div>
82
84
  </header>
@@ -6,40 +6,44 @@ Use hint text for supporting contextual help
6
6
 
7
7
  ## Quick start examples
8
8
 
9
- ### Component default
9
+ ### Hint
10
10
 
11
- [Preview the hint component](http://govuk-frontend-review.herokuapp.com/components/hint/preview)
11
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/hint/preview)
12
12
 
13
13
  #### Markup
14
14
 
15
15
  <span class="govuk-hint">
16
- It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
16
+ It’s on your National Insurance card, benefit letter, payslip or P60.
17
+ For example, ‘QQ 12 34 56 C’.
18
+
17
19
  </span>
18
20
 
19
21
  #### Macro
20
22
 
21
- {% from 'hint/macro.njk' import govukHint %}
23
+ {% from "hint/macro.njk" import govukHint %}
22
24
 
23
25
  {{ govukHint({
24
- "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
26
+ "text": "It’s on your National Insurance card, benefit letter, payslip or P60.\nFor example, ‘QQ 12 34 56 C’.\n"
25
27
  }) }}
26
28
 
27
- ### Hint--with html
29
+ ### Hint with html
28
30
 
29
- [Preview the hint--with html example](http://govuk-frontend-review.herokuapp.com/components/hint/with html/preview)
31
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/hint/with-html/preview)
30
32
 
31
33
  #### Markup
32
34
 
33
35
  <span class="govuk-hint">
34
- It’s on your National Insurance card, benefit letter, payslip or <a class="govuk-link" href="#">P60</a>. For example, ‘QQ 12 34 56 C’.
36
+ It’s on your National Insurance card, benefit letter, payslip or <a class="govuk-link" href="#">P60</a>.
37
+ For example, ‘QQ 12 34 56 C’.
38
+
35
39
  </span>
36
40
 
37
41
  #### Macro
38
42
 
39
- {% from 'hint/macro.njk' import govukHint %}
43
+ {% from "hint/macro.njk" import govukHint %}
40
44
 
41
45
  {{ govukHint({
42
- "html": "It’s on your National Insurance card, benefit letter, payslip or <a class=\"govuk-link\" href=\"#\">P60</a>. For example, ‘QQ 12 34 56 C’."
46
+ "html": "It’s on your National Insurance card, benefit letter, payslip or <a class=\"govuk-link\" href=\"#\">P60</a>.\nFor example, ‘QQ 12 34 56 C’.\n"
43
47
  }) }}
44
48
 
45
49
  ## Requirements
@@ -6,13 +6,13 @@ A single-line text field.
6
6
 
7
7
  ## Guidance
8
8
 
9
- Find out when to use the Input component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/text-input).
9
+ Find out when to use the input component in your service in the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital/components/text-input).
10
10
 
11
11
  ## Quick start examples
12
12
 
13
- ### Component default
13
+ ### Input
14
14
 
15
- [Preview the input component](http://govuk-frontend-review.herokuapp.com/components/input/preview)
15
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/preview)
16
16
 
17
17
  #### Markup
18
18
 
@@ -26,7 +26,7 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
26
26
 
27
27
  #### Macro
28
28
 
29
- {% from 'input/macro.njk' import govukInput %}
29
+ {% from "input/macro.njk" import govukInput %}
30
30
 
31
31
  {{ govukInput({
32
32
  "label": {
@@ -36,9 +36,9 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
36
36
  "name": "test-name"
37
37
  }) }}
38
38
 
39
- ### Input--with-hint-text
39
+ ### Input with hint text
40
40
 
41
- [Preview the input--with-hint-text example](http://govuk-frontend-review.herokuapp.com/components/input/with-hint-text/preview)
41
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-hint-text/preview)
42
42
 
43
43
  #### Markup
44
44
 
@@ -56,7 +56,7 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
56
56
 
57
57
  #### Macro
58
58
 
59
- {% from 'input/macro.njk' import govukInput %}
59
+ {% from "input/macro.njk" import govukInput %}
60
60
 
61
61
  {{ govukInput({
62
62
  "label": {
@@ -69,9 +69,9 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
69
69
  "name": "test-name-2"
70
70
  }) }}
71
71
 
72
- ### Input--with-error-message
72
+ ### Input with error message
73
73
 
74
- [Preview the input--with-error-message example](http://govuk-frontend-review.herokuapp.com/components/input/with-error-message/preview)
74
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-error-message/preview)
75
75
 
76
76
  #### Markup
77
77
 
@@ -81,7 +81,7 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
81
81
  </label>
82
82
 
83
83
  <span id="input-with-error-message-hint" class="govuk-hint">
84
- It’s on your <i>National Insurance card</i>, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
84
+ It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
85
85
  </span>
86
86
 
87
87
  <span id="input-with-error-message-error" class="govuk-error-message">
@@ -93,14 +93,14 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
93
93
 
94
94
  #### Macro
95
95
 
96
- {% from 'input/macro.njk' import govukInput %}
96
+ {% from "input/macro.njk" import govukInput %}
97
97
 
98
98
  {{ govukInput({
99
99
  "label": {
100
100
  "text": "National Insurance number"
101
101
  },
102
102
  "hint": {
103
- "html": "It’s on your <i>National Insurance card</i>, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
103
+ "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
104
104
  },
105
105
  "id": "input-with-error-message",
106
106
  "name": "test-name-3",
@@ -109,9 +109,145 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
109
109
  }
110
110
  }) }}
111
111
 
112
- ### Input--width-10
112
+ ### Input with width-2 class
113
+
114
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-width-2-class/preview)
115
+
116
+ #### Markup
117
+
118
+ <div class="govuk-form-group">
119
+ <label class="govuk-label" for="input-width-2">
120
+ National insurance number
121
+ </label>
122
+
123
+ <span id="input-width-2-hint" class="govuk-hint">
124
+ It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
125
+ </span>
126
+
127
+ <input class="govuk-input govuk-input--width-2" id="input-width-2" name="test-width-2" type="text" aria-describedby="input-width-2-hint">
128
+ </div>
129
+
130
+ #### Macro
131
+
132
+ {% from "input/macro.njk" import govukInput %}
133
+
134
+ {{ govukInput({
135
+ "label": {
136
+ "text": "National insurance number"
137
+ },
138
+ "hint": {
139
+ "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
140
+ },
141
+ "id": "input-width-2",
142
+ "name": "test-width-2",
143
+ "classes": "govuk-input--width-2"
144
+ }) }}
145
+
146
+ ### Input with width-3 class
147
+
148
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-width-3-class/preview)
149
+
150
+ #### Markup
151
+
152
+ <div class="govuk-form-group">
153
+ <label class="govuk-label" for="input-width-3">
154
+ National insurance number
155
+ </label>
156
+
157
+ <span id="input-width-3-hint" class="govuk-hint">
158
+ It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
159
+ </span>
160
+
161
+ <input class="govuk-input govuk-input--width-3" id="input-width-3" name="test-width-3" type="text" aria-describedby="input-width-3-hint">
162
+ </div>
163
+
164
+ #### Macro
165
+
166
+ {% from "input/macro.njk" import govukInput %}
167
+
168
+ {{ govukInput({
169
+ "label": {
170
+ "text": "National insurance number"
171
+ },
172
+ "hint": {
173
+ "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
174
+ },
175
+ "id": "input-width-3",
176
+ "name": "test-width-3",
177
+ "classes": "govuk-input--width-3"
178
+ }) }}
179
+
180
+ ### Input with width-4 class
181
+
182
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-width-4-class/preview)
183
+
184
+ #### Markup
185
+
186
+ <div class="govuk-form-group">
187
+ <label class="govuk-label" for="input-width-4">
188
+ National insurance number
189
+ </label>
190
+
191
+ <span id="input-width-4-hint" class="govuk-hint">
192
+ It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
193
+ </span>
194
+
195
+ <input class="govuk-input govuk-input--width-4" id="input-width-4" name="test-width-4" type="text" aria-describedby="input-width-4-hint">
196
+ </div>
197
+
198
+ #### Macro
199
+
200
+ {% from "input/macro.njk" import govukInput %}
201
+
202
+ {{ govukInput({
203
+ "label": {
204
+ "text": "National insurance number"
205
+ },
206
+ "hint": {
207
+ "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
208
+ },
209
+ "id": "input-width-4",
210
+ "name": "test-width-4",
211
+ "classes": "govuk-input--width-4"
212
+ }) }}
213
+
214
+ ### Input with width-5 class
215
+
216
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-width-5-class/preview)
217
+
218
+ #### Markup
219
+
220
+ <div class="govuk-form-group">
221
+ <label class="govuk-label" for="input-width-5">
222
+ National insurance number
223
+ </label>
224
+
225
+ <span id="input-width-5-hint" class="govuk-hint">
226
+ It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
227
+ </span>
228
+
229
+ <input class="govuk-input govuk-input--width-5" id="input-width-5" name="test-width-5" type="text" aria-describedby="input-width-5-hint">
230
+ </div>
231
+
232
+ #### Macro
233
+
234
+ {% from "input/macro.njk" import govukInput %}
235
+
236
+ {{ govukInput({
237
+ "label": {
238
+ "text": "National insurance number"
239
+ },
240
+ "hint": {
241
+ "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
242
+ },
243
+ "id": "input-width-5",
244
+ "name": "test-width-5",
245
+ "classes": "govuk-input--width-5"
246
+ }) }}
247
+
248
+ ### Input with width-10 class
113
249
 
114
- [Preview the input--width-10 example](http://govuk-frontend-review.herokuapp.com/components/input/width-10/preview)
250
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-width-10-class/preview)
115
251
 
116
252
  #### Markup
117
253
 
@@ -124,12 +260,12 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
124
260
  It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
125
261
  </span>
126
262
 
127
- <input class="govuk-input govuk-input--width-10" id="input-width-10" name="test-name-4" type="text" aria-describedby="input-width-10-hint">
263
+ <input class="govuk-input govuk-input--width-10" id="input-width-10" name="test-width-10" type="text" aria-describedby="input-width-10-hint">
128
264
  </div>
129
265
 
130
266
  #### Macro
131
267
 
132
- {% from 'input/macro.njk' import govukInput %}
268
+ {% from "input/macro.njk" import govukInput %}
133
269
 
134
270
  {{ govukInput({
135
271
  "label": {
@@ -139,13 +275,13 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
139
275
  "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
140
276
  },
141
277
  "id": "input-width-10",
142
- "name": "test-name-4",
278
+ "name": "test-width-10",
143
279
  "classes": "govuk-input--width-10"
144
280
  }) }}
145
281
 
146
- ### Input--width-20
282
+ ### Input with width-20 class
147
283
 
148
- [Preview the input--width-20 example](http://govuk-frontend-review.herokuapp.com/components/input/width-20/preview)
284
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-width-20-class/preview)
149
285
 
150
286
  #### Markup
151
287
 
@@ -158,12 +294,12 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
158
294
  It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
159
295
  </span>
160
296
 
161
- <input class="govuk-input govuk-input--width-20" id="input-width-20" name="test-name-5" type="text" aria-describedby="input-width-20-hint">
297
+ <input class="govuk-input govuk-input--width-20" id="input-width-20" name="test-width-20" type="text" aria-describedby="input-width-20-hint">
162
298
  </div>
163
299
 
164
300
  #### Macro
165
301
 
166
- {% from 'input/macro.njk' import govukInput %}
302
+ {% from "input/macro.njk" import govukInput %}
167
303
 
168
304
  {{ govukInput({
169
305
  "label": {
@@ -173,13 +309,13 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
173
309
  "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
174
310
  },
175
311
  "id": "input-width-20",
176
- "name": "test-name-5",
312
+ "name": "test-width-20",
177
313
  "classes": "govuk-input--width-20"
178
314
  }) }}
179
315
 
180
- ### Input--width-30
316
+ ### Input with width-30 class
181
317
 
182
- [Preview the input--width-30 example](http://govuk-frontend-review.herokuapp.com/components/input/width-30/preview)
318
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-width-30-class/preview)
183
319
 
184
320
  #### Markup
185
321
 
@@ -192,12 +328,12 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
192
328
  It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’.
193
329
  </span>
194
330
 
195
- <input class="govuk-input govuk-input--width-30" id="input-width-30" name="test-name-6" type="text" aria-describedby="input-width-30-hint">
331
+ <input class="govuk-input govuk-input--width-30" id="input-width-30" name="test-width-30" type="text" aria-describedby="input-width-30-hint">
196
332
  </div>
197
333
 
198
334
  #### Macro
199
335
 
200
- {% from 'input/macro.njk' import govukInput %}
336
+ {% from "input/macro.njk" import govukInput %}
201
337
 
202
338
  {{ govukInput({
203
339
  "label": {
@@ -207,13 +343,13 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
207
343
  "text": "It’s on your National Insurance card, benefit letter, payslip or P60\. For example, ‘QQ 12 34 56 C’."
208
344
  },
209
345
  "id": "input-width-30",
210
- "name": "test-name-6",
346
+ "name": "test-width-30",
211
347
  "classes": "govuk-input--width-30"
212
348
  }) }}
213
349
 
214
- ### Input--with-label-as-page-heading
350
+ ### Input with label as page heading
215
351
 
216
- [Preview the input--with-label-as-page-heading example](http://govuk-frontend-review.herokuapp.com/components/input/with-label-as-page-heading/preview)
352
+ [Preview this example in the Frontend review app](http://govuk-frontend-review.herokuapp.com/components/input/with-label-as-page-heading/preview)
217
353
 
218
354
  #### Markup
219
355
 
@@ -230,7 +366,7 @@ Find out when to use the Input component in your service in the [GOV.UK Design S
230
366
 
231
367
  #### Macro
232
368
 
233
- {% from 'input/macro.njk' import govukInput %}
369
+ {% from "input/macro.njk" import govukInput %}
234
370
 
235
371
  {{ govukInput({
236
372
  "label": {
@@ -46,17 +46,34 @@
46
46
 
47
47
  // The ex measurements are based on the number of W's that can fit inside the input
48
48
  // Extra space is left on the right hand side to allow for the Safari prefill icon
49
+ // Linear regression estimation based on visual tests: y = 1.76 + 1.81x
49
50
 
50
51
  .govuk-input--width-30 {
51
- max-width: 60ex;
52
+ max-width: 56ex + 3ex;
52
53
  }
53
54
 
54
55
  .govuk-input--width-20 {
55
- max-width: 41ex;
56
+ max-width: 38ex + 3ex;
56
57
  }
57
58
 
58
59
  .govuk-input--width-10 {
59
- max-width: 23ex;
60
+ max-width: 20ex + 3ex;
61
+ }
62
+
63
+ .govuk-input--width-5 {
64
+ max-width: 10.8ex;
65
+ }
66
+
67
+ .govuk-input--width-4 {
68
+ max-width: 9ex;
69
+ }
70
+
71
+ .govuk-input--width-3 {
72
+ max-width: 7.2ex;
73
+ }
74
+
75
+ .govuk-input--width-2 {
76
+ max-width: 5.4ex;
60
77
  }
61
78
 
62
79
  }