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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +11 -6
- data/app/assets/javascripts/govuk_publishing_components/vendor/modernizr.js +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/admin_styles_ie8.scss +2 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +2 -0
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +7 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav.html.erb +3 -5
- data/app/views/layouts/govuk_publishing_components/application.html.erb +6 -0
- data/config/initializers/assets.rb +2 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/README.md +1 -1
- data/node_modules/govuk-frontend/all.js +3 -1
- data/node_modules/govuk-frontend/components/back-link/README.md +23 -7
- data/node_modules/govuk-frontend/components/breadcrumbs/README.md +26 -26
- data/node_modules/govuk-frontend/components/button/README.md +22 -22
- data/node_modules/govuk-frontend/components/checkboxes/README.md +115 -27
- data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +7 -1
- data/node_modules/govuk-frontend/components/date-input/README.md +141 -61
- data/node_modules/govuk-frontend/components/date-input/_date-input.scss +0 -5
- data/node_modules/govuk-frontend/components/date-input/template.njk +40 -17
- data/node_modules/govuk-frontend/components/details/README.md +10 -10
- data/node_modules/govuk-frontend/components/error-message/README.md +4 -4
- data/node_modules/govuk-frontend/components/error-summary/README.md +5 -5
- data/node_modules/govuk-frontend/components/fieldset/README.md +7 -7
- data/node_modules/govuk-frontend/components/file-upload/README.md +16 -16
- data/node_modules/govuk-frontend/components/footer/README.md +5 -5
- data/node_modules/govuk-frontend/components/footer/template.njk +1 -1
- data/node_modules/govuk-frontend/components/header/README.md +26 -18
- data/node_modules/govuk-frontend/components/header/_header.scss +3 -2
- data/node_modules/govuk-frontend/components/header/template.njk +5 -3
- data/node_modules/govuk-frontend/components/hint/README.md +14 -10
- data/node_modules/govuk-frontend/components/input/README.md +166 -30
- data/node_modules/govuk-frontend/components/input/_input.scss +20 -3
- data/node_modules/govuk-frontend/components/inset-text/README.md +6 -6
- data/node_modules/govuk-frontend/components/label/README.md +9 -9
- data/node_modules/govuk-frontend/components/panel/README.md +43 -4
- data/node_modules/govuk-frontend/components/panel/template.njk +4 -2
- data/node_modules/govuk-frontend/components/phase-banner/README.md +4 -4
- data/node_modules/govuk-frontend/components/phase-banner/_phase-banner.scss +3 -3
- data/node_modules/govuk-frontend/components/radios/README.md +100 -29
- data/node_modules/govuk-frontend/components/radios/_radios.scss +12 -3
- data/node_modules/govuk-frontend/components/select/README.md +12 -12
- data/node_modules/govuk-frontend/components/skip-link/README.md +4 -4
- data/node_modules/govuk-frontend/components/table/README.md +12 -12
- data/node_modules/govuk-frontend/components/table/_table.scss +2 -2
- data/node_modules/govuk-frontend/components/tabs/README.md +4 -4
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +1 -0
- data/node_modules/govuk-frontend/components/tag/README.md +7 -7
- data/node_modules/govuk-frontend/components/tag/_tag.scss +6 -0
- data/node_modules/govuk-frontend/components/textarea/README.md +16 -16
- data/node_modules/govuk-frontend/components/warning-text/README.md +4 -4
- data/node_modules/govuk-frontend/components/warning-text/_warning-text.scss +14 -4
- data/node_modules/govuk-frontend/core/_template.scss +7 -3
- data/node_modules/govuk-frontend/helpers/_typography.scss +44 -10
- data/node_modules/govuk-frontend/objects/_main-wrapper.scss +4 -0
- data/node_modules/govuk-frontend/package.json +18 -12
- data/node_modules/govuk-frontend/settings/_typography-responsive.scss +35 -0
- data/node_modules/govuk-frontend/tools/_all.scss +1 -0
- data/node_modules/govuk-frontend/tools/_px-to-rem.scss +20 -0
- data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +6 -0
- metadata +5 -28
- data/node_modules/govuk-frontend/components/back-link/back-link.njk +0 -3
- data/node_modules/govuk-frontend/components/breadcrumbs/breadcrumbs.njk +0 -14
- data/node_modules/govuk-frontend/components/button/button.njk +0 -3
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.njk +0 -27
- data/node_modules/govuk-frontend/components/date-input/date-input.njk +0 -23
- data/node_modules/govuk-frontend/components/details/details.njk +0 -7
- data/node_modules/govuk-frontend/components/error-message/error-message.njk +0 -7
- data/node_modules/govuk-frontend/components/error-summary/error-summary.njk +0 -17
- data/node_modules/govuk-frontend/components/fieldset/fieldset.njk +0 -13
- data/node_modules/govuk-frontend/components/file-upload/file-upload.njk +0 -9
- data/node_modules/govuk-frontend/components/footer/footer.njk +0 -3
- data/node_modules/govuk-frontend/components/header/header.njk +0 -3
- data/node_modules/govuk-frontend/components/hint/hint.njk +0 -7
- data/node_modules/govuk-frontend/components/input/input.njk +0 -9
- data/node_modules/govuk-frontend/components/inset-text/inset-text.njk +0 -7
- data/node_modules/govuk-frontend/components/label/label.njk +0 -6
- data/node_modules/govuk-frontend/components/panel/panel.njk +0 -7
- data/node_modules/govuk-frontend/components/phase-banner/phase-banner.njk +0 -7
- data/node_modules/govuk-frontend/components/radios/radios.njk +0 -27
- data/node_modules/govuk-frontend/components/select/select.njk +0 -24
- data/node_modules/govuk-frontend/components/skip-link/skip-link.njk +0 -3
- data/node_modules/govuk-frontend/components/table/table.njk +0 -45
- data/node_modules/govuk-frontend/components/tabs/tabs.njk +0 -3
- data/node_modules/govuk-frontend/components/tag/tag.njk +0 -7
- data/node_modules/govuk-frontend/components/textarea/textarea.njk +0 -11
- 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
|
55
|
+
</div>
|
56
|
+
{% if params.serviceName or params.navigation %}
|
57
|
+
<div class="govuk-header__content">
|
56
58
|
|
57
|
-
{% if
|
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
|
-
###
|
9
|
+
### Hint
|
10
10
|
|
11
|
-
[Preview the
|
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
|
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
|
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
|
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
|
29
|
+
### Hint with html
|
28
30
|
|
29
|
-
[Preview the
|
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>.
|
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
|
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
|
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
|
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
|
-
###
|
13
|
+
### Input
|
14
14
|
|
15
|
-
[Preview the
|
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
|
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
|
39
|
+
### Input with hint text
|
40
40
|
|
41
|
-
[Preview the
|
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
|
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
|
72
|
+
### Input with error message
|
73
73
|
|
74
|
-
[Preview the
|
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
|
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
|
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
|
-
"
|
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
|
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
|
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-
|
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
|
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-
|
278
|
+
"name": "test-width-10",
|
143
279
|
"classes": "govuk-input--width-10"
|
144
280
|
}) }}
|
145
281
|
|
146
|
-
### Input
|
282
|
+
### Input with width-20 class
|
147
283
|
|
148
|
-
[Preview the
|
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-
|
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
|
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-
|
312
|
+
"name": "test-width-20",
|
177
313
|
"classes": "govuk-input--width-20"
|
178
314
|
}) }}
|
179
315
|
|
180
|
-
### Input
|
316
|
+
### Input with width-30 class
|
181
317
|
|
182
|
-
[Preview the
|
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-
|
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
|
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-
|
346
|
+
"name": "test-width-30",
|
211
347
|
"classes": "govuk-input--width-30"
|
212
348
|
}) }}
|
213
349
|
|
214
|
-
### Input
|
350
|
+
### Input with label as page heading
|
215
351
|
|
216
|
-
[Preview the
|
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
|
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:
|
52
|
+
max-width: 56ex + 3ex;
|
52
53
|
}
|
53
54
|
|
54
55
|
.govuk-input--width-20 {
|
55
|
-
max-width:
|
56
|
+
max-width: 38ex + 3ex;
|
56
57
|
}
|
57
58
|
|
58
59
|
.govuk-input--width-10 {
|
59
|
-
max-width:
|
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
|
}
|