dxw_govuk_frontend_rails 3.14.0 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +0 -4
- data/Gemfile.lock +1 -1
- data/lib/dxw_govuk_frontend_rails/version.rb +1 -1
- data/package-lock.json +5 -12
- data/package.json +1 -1
- data/vendor/assets/javascripts/govuk_frontend_rails.js +4527 -2376
- data/vendor/assets/stylesheets/all-ie8.scss +8 -0
- data/vendor/assets/stylesheets/components/_all.scss +2 -1
- data/vendor/assets/stylesheets/components/accordion/_index.scss +294 -99
- data/vendor/assets/stylesheets/components/back-link/_index.scss +20 -20
- data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +22 -13
- data/vendor/assets/stylesheets/components/button/_index.scss +37 -27
- data/vendor/assets/stylesheets/components/character-count/_index.scss +9 -0
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +9 -8
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +0 -2
- data/vendor/assets/stylesheets/components/error-message/_index.scss +1 -0
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +6 -1
- data/vendor/assets/stylesheets/components/footer/_index.scss +16 -67
- data/vendor/assets/stylesheets/components/header/_index.scss +44 -26
- data/vendor/assets/stylesheets/components/hint/_index.scss +1 -3
- data/vendor/assets/stylesheets/components/input/_index.scss +29 -27
- data/vendor/assets/stylesheets/components/pagination/_index.scss +247 -0
- data/vendor/assets/stylesheets/components/pagination/_pagination.scss +2 -0
- data/vendor/assets/stylesheets/components/panel/_index.scss +1 -1
- data/vendor/assets/stylesheets/components/radios/_index.scss +10 -17
- data/vendor/assets/stylesheets/components/select/_index.scss +19 -2
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +14 -3
- data/vendor/assets/stylesheets/components/summary-list/_index.scss +164 -33
- data/vendor/assets/stylesheets/components/table/_index.scss +1 -1
- data/vendor/assets/stylesheets/components/tabs/_index.scss +2 -2
- data/vendor/assets/stylesheets/components/tag/_index.scss +18 -23
- data/vendor/assets/stylesheets/components/textarea/_index.scss +9 -2
- data/vendor/assets/stylesheets/core/_all.scss +1 -1
- data/vendor/assets/stylesheets/core/_global-styles.scss +0 -6
- data/vendor/assets/stylesheets/core/_govuk-frontend-version.scss +5 -0
- data/vendor/assets/stylesheets/core/_links.scss +0 -6
- data/vendor/assets/stylesheets/core/_lists.scss +0 -6
- data/vendor/assets/stylesheets/core/_section-break.scss +1 -7
- data/vendor/assets/stylesheets/core/_typography.scss +0 -6
- data/vendor/assets/stylesheets/helpers/_colour.scss +10 -7
- data/vendor/assets/stylesheets/helpers/_focused.scss +6 -1
- data/vendor/assets/stylesheets/helpers/_font-faces.scss +1 -1
- data/vendor/assets/stylesheets/helpers/_links.scss +13 -11
- data/vendor/assets/stylesheets/helpers/_media-queries.scss +2 -2
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +1 -1
- data/vendor/assets/stylesheets/helpers/_spacing.scss +3 -3
- data/vendor/assets/stylesheets/helpers/_typography.scss +16 -9
- data/vendor/assets/stylesheets/objects/_all.scss +1 -0
- data/vendor/assets/stylesheets/objects/_button-group.scss +10 -26
- data/vendor/assets/stylesheets/objects/_main-wrapper.scss +15 -30
- data/vendor/assets/stylesheets/objects/_template.scss +32 -0
- data/vendor/assets/stylesheets/objects/_width-container.scss +1 -5
- data/vendor/assets/stylesheets/overrides/_display.scss +0 -6
- data/vendor/assets/stylesheets/overrides/_spacing.scss +56 -18
- data/vendor/assets/stylesheets/overrides/_text-align.scss +0 -6
- data/vendor/assets/stylesheets/overrides/_typography.scss +0 -6
- data/vendor/assets/stylesheets/overrides/_width.scss +0 -6
- data/vendor/assets/stylesheets/settings/_all.scss +1 -0
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +7 -0
- data/vendor/assets/stylesheets/settings/_colours-palette.scss +12 -0
- data/vendor/assets/stylesheets/settings/_compatibility.scss +26 -0
- data/vendor/assets/stylesheets/settings/_ie8.scss +16 -0
- data/vendor/assets/stylesheets/settings/_links.scss +5 -1
- data/vendor/assets/stylesheets/settings/_measurements.scss +5 -15
- data/vendor/assets/stylesheets/settings/_spacing.scss +4 -8
- data/vendor/assets/stylesheets/settings/_typography-font.scss +23 -0
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +12 -0
- data/vendor/assets/stylesheets/settings/_warnings.scss +53 -0
- data/vendor/assets/stylesheets/tools/_all.scss +0 -1
- data/vendor/assets/stylesheets/tools/_compatibility.scss +20 -6
- data/vendor/assets/stylesheets/tools/_exports.scss +1 -1
- data/vendor/assets/stylesheets/tools/_font-url.scss +1 -1
- data/vendor/assets/stylesheets/tools/_ie8.scss +38 -2
- data/vendor/assets/stylesheets/tools/_image-url.scss +1 -1
- data/vendor/assets/stylesheets/tools/_px-to-em.scss +2 -2
- data/vendor/assets/stylesheets/tools/_px-to-rem.scss +1 -1
- metadata +8 -3
@@ -22,7 +22,6 @@
|
|
22
22
|
|
23
23
|
// Disable inner shadow and remove rounded corners
|
24
24
|
-webkit-appearance: none;
|
25
|
-
-moz-appearance: none;
|
26
25
|
appearance: none;
|
27
26
|
|
28
27
|
&:focus {
|
@@ -35,12 +34,19 @@
|
|
35
34
|
// here as it is already used for the yellow focus state.
|
36
35
|
box-shadow: inset 0 0 0 $govuk-border-width-form-element;
|
37
36
|
|
38
|
-
@include
|
37
|
+
@include _govuk-if-ie8 {
|
39
38
|
// IE8 doesn't support `box-shadow` so double the border with
|
40
39
|
// `border-width`.
|
41
40
|
border-width: $govuk-border-width-form-element * 2;
|
42
41
|
}
|
43
42
|
}
|
43
|
+
|
44
|
+
&:disabled {
|
45
|
+
opacity: .5;
|
46
|
+
color: inherit;
|
47
|
+
background-color: transparent;
|
48
|
+
cursor: not-allowed;
|
49
|
+
}
|
44
50
|
}
|
45
51
|
|
46
52
|
.govuk-input::-webkit-outer-spin-button,
|
@@ -54,56 +60,56 @@
|
|
54
60
|
}
|
55
61
|
|
56
62
|
.govuk-input--error {
|
57
|
-
border: $govuk-
|
63
|
+
border-color: $govuk-error-colour;
|
58
64
|
|
59
65
|
&:focus {
|
60
66
|
border-color: $govuk-input-border-colour;
|
61
67
|
}
|
62
68
|
}
|
63
69
|
|
64
|
-
|
65
|
-
|
66
|
-
|
70
|
+
.govuk-input--extra-letter-spacing {
|
71
|
+
@include govuk-font(false, $tabular: true);
|
72
|
+
letter-spacing: .05em;
|
73
|
+
}
|
74
|
+
|
75
|
+
// em measurements are based on the point size of the typeface
|
76
|
+
// Extra space is added on the right hand side to allow for the Safari prefill icon
|
67
77
|
|
68
78
|
.govuk-input--width-30 {
|
69
|
-
max-width:
|
79
|
+
max-width: 29.5em;
|
70
80
|
}
|
71
81
|
|
72
82
|
.govuk-input--width-20 {
|
73
|
-
max-width:
|
83
|
+
max-width: 20.5em;
|
74
84
|
}
|
75
85
|
|
76
86
|
.govuk-input--width-10 {
|
77
|
-
max-width:
|
87
|
+
max-width: 11.5em;
|
78
88
|
}
|
79
89
|
|
80
90
|
.govuk-input--width-5 {
|
81
|
-
max-width:
|
91
|
+
max-width: 5.5em;
|
82
92
|
}
|
83
93
|
|
84
94
|
.govuk-input--width-4 {
|
85
|
-
max-width:
|
95
|
+
max-width: 4.5em;
|
86
96
|
}
|
87
97
|
|
88
98
|
.govuk-input--width-3 {
|
89
|
-
max-width:
|
99
|
+
max-width: 3.75em;
|
90
100
|
}
|
91
101
|
|
92
102
|
.govuk-input--width-2 {
|
93
|
-
max-width:
|
103
|
+
max-width: 2.75em;
|
94
104
|
}
|
95
105
|
|
96
106
|
.govuk-input__wrapper {
|
97
|
-
display: -webkit-box;
|
98
|
-
display: -webkit-flex;
|
99
107
|
display: -ms-flexbox;
|
100
108
|
display: flex;
|
101
109
|
|
102
110
|
.govuk-input {
|
103
|
-
-
|
104
|
-
|
105
|
-
-ms-flex: 0 1 auto;
|
106
|
-
flex: 0 1 auto;
|
111
|
+
-ms-flex: 0 1 auto;
|
112
|
+
flex: 0 1 auto;
|
107
113
|
}
|
108
114
|
|
109
115
|
.govuk-input:focus {
|
@@ -150,13 +156,9 @@
|
|
150
156
|
// Emphasise non-editable status of prefixes and suffixes
|
151
157
|
cursor: default;
|
152
158
|
|
153
|
-
-
|
154
|
-
|
155
|
-
-webkit-flex: 0 0 auto;
|
156
|
-
|
157
|
-
-ms-flex: 0 0 auto;
|
159
|
+
-ms-flex: 0 0 auto;
|
158
160
|
|
159
|
-
|
161
|
+
flex: 0 0 auto;
|
160
162
|
|
161
163
|
// Split prefix/suffix onto separate lines on narrow screens
|
162
164
|
@include govuk-media-query($until: mobile) {
|
@@ -171,7 +173,7 @@
|
|
171
173
|
border-bottom: 0;
|
172
174
|
}
|
173
175
|
@include govuk-media-query($from: mobile) {
|
174
|
-
@include
|
176
|
+
@include _govuk-not-ie8 {
|
175
177
|
border-right: 0;
|
176
178
|
}
|
177
179
|
}
|
@@ -183,7 +185,7 @@
|
|
183
185
|
border-top: 0;
|
184
186
|
}
|
185
187
|
@include govuk-media-query($from: mobile) {
|
186
|
-
@include
|
188
|
+
@include _govuk-not-ie8 {
|
187
189
|
border-left: 0;
|
188
190
|
}
|
189
191
|
}
|
@@ -0,0 +1,247 @@
|
|
1
|
+
@include govuk-exports("govuk/component/pagination") {
|
2
|
+
// Flexbox enhancement for small screen visual design
|
3
|
+
// Falls back to a float: left layout on non-flex browsers
|
4
|
+
.govuk-pagination {
|
5
|
+
@include govuk-responsive-margin(6, "bottom");
|
6
|
+
display: -ms-flexbox;
|
7
|
+
display: flex;
|
8
|
+
-ms-flex-direction: column;
|
9
|
+
flex-direction: column;
|
10
|
+
-ms-flex-align: center;
|
11
|
+
align-items: center;
|
12
|
+
-ms-flex-wrap: wrap;
|
13
|
+
flex-wrap: wrap;
|
14
|
+
|
15
|
+
@include govuk-media-query($from: tablet) {
|
16
|
+
-ms-flex-direction: row;
|
17
|
+
flex-direction: row;
|
18
|
+
-ms-flex-align: start;
|
19
|
+
align-items: flex-start;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
.govuk-pagination__list {
|
24
|
+
margin: 0;
|
25
|
+
padding: 0;
|
26
|
+
list-style: none;
|
27
|
+
}
|
28
|
+
|
29
|
+
.govuk-pagination__item,
|
30
|
+
.govuk-pagination__next,
|
31
|
+
.govuk-pagination__prev {
|
32
|
+
@include govuk-font(19);
|
33
|
+
box-sizing: border-box;
|
34
|
+
position: relative;
|
35
|
+
min-width: 45px;
|
36
|
+
min-height: 45px;
|
37
|
+
padding: govuk-spacing(2) govuk-spacing(3);
|
38
|
+
float: left; // Float is ignored if flex is active for prev/next links
|
39
|
+
|
40
|
+
&:hover {
|
41
|
+
background-color: govuk-colour("light-grey", $legacy: "grey-4");
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
.govuk-pagination__item {
|
46
|
+
// Hide items on small screens except the prev/next items,
|
47
|
+
// non-link items and the first and last items
|
48
|
+
display: none;
|
49
|
+
|
50
|
+
// Center align pagination links in their parent list item so that they
|
51
|
+
// visually sit in the middle of their touch area
|
52
|
+
text-align: center;
|
53
|
+
|
54
|
+
@include govuk-media-query($from: tablet) {
|
55
|
+
display: block;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
.govuk-pagination__prev,
|
60
|
+
.govuk-pagination__next {
|
61
|
+
@include govuk-typography-weight-bold;
|
62
|
+
|
63
|
+
// Use flex to get around a whitespace issue between the arrow svg and the link text
|
64
|
+
// without having to rely on whitespace control from backend tooling
|
65
|
+
.govuk-pagination__link {
|
66
|
+
display: -ms-flexbox;
|
67
|
+
display: flex;
|
68
|
+
-ms-flex-align: center;
|
69
|
+
align-items: center;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
.govuk-pagination__prev {
|
74
|
+
padding-left: 0;
|
75
|
+
}
|
76
|
+
|
77
|
+
.govuk-pagination__next {
|
78
|
+
padding-right: 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
// Only show first, last and non-link items on mobile
|
82
|
+
.govuk-pagination__item--current,
|
83
|
+
.govuk-pagination__item--ellipses,
|
84
|
+
.govuk-pagination__item:first-child,
|
85
|
+
.govuk-pagination__item:last-child {
|
86
|
+
display: block;
|
87
|
+
}
|
88
|
+
|
89
|
+
.govuk-pagination__item--current {
|
90
|
+
@include govuk-typography-weight-bold;
|
91
|
+
outline: 1px solid transparent;
|
92
|
+
background-color: $govuk-link-colour;
|
93
|
+
|
94
|
+
&:hover {
|
95
|
+
background-color: $govuk-link-colour;
|
96
|
+
}
|
97
|
+
|
98
|
+
.govuk-pagination__link {
|
99
|
+
@include govuk-link-style-inverse;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
.govuk-pagination__item--ellipses {
|
104
|
+
@include govuk-typography-weight-bold;
|
105
|
+
color: $govuk-secondary-text-colour;
|
106
|
+
|
107
|
+
// Remove hover state for ellipsis items as they don't have links within them
|
108
|
+
&:hover {
|
109
|
+
background-color: transparent;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
.govuk-pagination__link {
|
114
|
+
display: block;
|
115
|
+
min-width: govuk-spacing(3);
|
116
|
+
|
117
|
+
// Increase the touch area for the link to the parent element.
|
118
|
+
@media screen {
|
119
|
+
&:after {
|
120
|
+
content: "";
|
121
|
+
position: absolute;
|
122
|
+
top: 0;
|
123
|
+
right: 0;
|
124
|
+
bottom: 0;
|
125
|
+
left: 0;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
// Add link hover decoration to prev/next text if no label present on prev/next only mode
|
130
|
+
// We do this so that we have a hover state in all possible instances
|
131
|
+
&:hover,
|
132
|
+
&:active {
|
133
|
+
.govuk-pagination__link-title--decorated {
|
134
|
+
@include govuk-link-decoration;
|
135
|
+
}
|
136
|
+
|
137
|
+
.govuk-pagination__link-label,
|
138
|
+
.govuk-pagination__link-title--decorated {
|
139
|
+
@include govuk-link-hover-decoration;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
&:focus {
|
144
|
+
.govuk-pagination__icon {
|
145
|
+
color: $govuk-focus-text-colour;
|
146
|
+
}
|
147
|
+
|
148
|
+
.govuk-pagination__link-label {
|
149
|
+
text-decoration: none;
|
150
|
+
}
|
151
|
+
|
152
|
+
.govuk-pagination__link-title--decorated {
|
153
|
+
text-decoration: none;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
.govuk-pagination__link-label {
|
159
|
+
@include govuk-font($size: 19, $weight: "regular");
|
160
|
+
@include govuk-link-decoration;
|
161
|
+
display: inline-block;
|
162
|
+
padding-left: govuk-spacing(6);
|
163
|
+
}
|
164
|
+
|
165
|
+
.govuk-pagination__icon {
|
166
|
+
// Set size using rems to make the icon scale with text if user resizes text in their browser
|
167
|
+
width: govuk-px-to-rem(15px);
|
168
|
+
height: govuk-px-to-rem(13px);
|
169
|
+
color: $govuk-secondary-text-colour;
|
170
|
+
fill: currentcolor;
|
171
|
+
forced-color-adjust: auto;
|
172
|
+
}
|
173
|
+
|
174
|
+
.govuk-pagination__icon--prev {
|
175
|
+
margin-right: govuk-spacing(3);
|
176
|
+
}
|
177
|
+
|
178
|
+
.govuk-pagination__icon--next {
|
179
|
+
margin-left: govuk-spacing(3);
|
180
|
+
}
|
181
|
+
|
182
|
+
// Block mode - position previous and next links above and below numbers
|
183
|
+
.govuk-pagination--block {
|
184
|
+
display: block;
|
185
|
+
|
186
|
+
.govuk-pagination__item {
|
187
|
+
padding: govuk-spacing(3);
|
188
|
+
float: none;
|
189
|
+
}
|
190
|
+
|
191
|
+
.govuk-pagination__next,
|
192
|
+
.govuk-pagination__prev {
|
193
|
+
padding-left: 0;
|
194
|
+
float: none;
|
195
|
+
}
|
196
|
+
|
197
|
+
.govuk-pagination__next {
|
198
|
+
padding-right: govuk-spacing(3);
|
199
|
+
|
200
|
+
.govuk-pagination__icon {
|
201
|
+
margin-left: 0;
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
// Only apply a border between prev and next if both are present
|
206
|
+
.govuk-pagination__prev + .govuk-pagination__next {
|
207
|
+
border-top: 1px solid $govuk-border-colour;
|
208
|
+
}
|
209
|
+
|
210
|
+
// Reset both these elements to their inline default, both to ensure that the focus state
|
211
|
+
// for block mode "shrink wraps" text as expected
|
212
|
+
.govuk-pagination__link,
|
213
|
+
.govuk-pagination__link-title {
|
214
|
+
display: inline;
|
215
|
+
}
|
216
|
+
|
217
|
+
// Set the after pseudo element to a block which makes the title visually display
|
218
|
+
// as block level whilst programmatically being inline
|
219
|
+
// We do this to get around an NVDA quirk where adjacent block level
|
220
|
+
// elements are always read out separately
|
221
|
+
.govuk-pagination__link-title:after {
|
222
|
+
content: "";
|
223
|
+
display: block;
|
224
|
+
}
|
225
|
+
|
226
|
+
.govuk-pagination__link {
|
227
|
+
text-align: left;
|
228
|
+
|
229
|
+
&:focus {
|
230
|
+
// apply focus styling to the label within the link as if it were being focused
|
231
|
+
// to get around a display issue with a focusable inline element containing a mixture
|
232
|
+
// of inline and inline-block level elements
|
233
|
+
.govuk-pagination__link-label {
|
234
|
+
@include govuk-focused-text;
|
235
|
+
}
|
236
|
+
}
|
237
|
+
|
238
|
+
&:not(:focus) {
|
239
|
+
text-decoration: none;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
|
243
|
+
.govuk-pagination__icon {
|
244
|
+
margin-right: govuk-spacing(2);
|
245
|
+
}
|
246
|
+
}
|
247
|
+
}
|
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
// IE8 doesn’t support pseudo-elements, so we don’t want to hide native
|
41
41
|
// elements there.
|
42
|
-
@include
|
42
|
+
@include _govuk-not-ie8 {
|
43
43
|
position: absolute;
|
44
44
|
|
45
45
|
z-index: 1;
|
@@ -53,7 +53,7 @@
|
|
53
53
|
opacity: 0;
|
54
54
|
}
|
55
55
|
|
56
|
-
@include
|
56
|
+
@include _govuk-if-ie8 {
|
57
57
|
margin-top: 10px;
|
58
58
|
margin-right: $govuk-radios-size / -2;
|
59
59
|
margin-left: $govuk-radios-size / -2;
|
@@ -87,7 +87,7 @@
|
|
87
87
|
width: $govuk-radios-size;
|
88
88
|
height: $govuk-radios-size;
|
89
89
|
|
90
|
-
border: $govuk-border-width-form-element solid
|
90
|
+
border: $govuk-border-width-form-element solid currentcolor;
|
91
91
|
border-radius: 50%;
|
92
92
|
background: transparent;
|
93
93
|
}
|
@@ -106,10 +106,10 @@
|
|
106
106
|
width: 0;
|
107
107
|
height: 0;
|
108
108
|
|
109
|
-
border: govuk-spacing(2) solid
|
109
|
+
border: govuk-spacing(2) solid currentcolor;
|
110
110
|
border-radius: 50%;
|
111
111
|
opacity: 0;
|
112
|
-
background:
|
112
|
+
background: currentcolor;
|
113
113
|
}
|
114
114
|
|
115
115
|
.govuk-radios__hint {
|
@@ -146,10 +146,11 @@
|
|
146
146
|
// Disabled state
|
147
147
|
.govuk-radios__input:disabled,
|
148
148
|
.govuk-radios__input:disabled + .govuk-radios__label {
|
149
|
-
cursor:
|
149
|
+
cursor: not-allowed;
|
150
150
|
}
|
151
151
|
|
152
|
-
.govuk-radios__input:disabled + .govuk-radios__label
|
152
|
+
.govuk-radios__input:disabled + .govuk-radios__label,
|
153
|
+
.govuk-radios__input:disabled ~ .govuk-hint {
|
153
154
|
opacity: .5;
|
154
155
|
}
|
155
156
|
|
@@ -167,14 +168,6 @@
|
|
167
168
|
clear: none;
|
168
169
|
}
|
169
170
|
}
|
170
|
-
|
171
|
-
// Prevent inline modifier being used with conditional reveals
|
172
|
-
&.govuk-radios--conditional {
|
173
|
-
.govuk-radios__item {
|
174
|
-
margin-right: 0;
|
175
|
-
float: none;
|
176
|
-
}
|
177
|
-
}
|
178
171
|
}
|
179
172
|
|
180
173
|
// =========================================================
|
@@ -246,11 +239,11 @@
|
|
246
239
|
// ▲┆└─ Radio pseudo element, aligned with margin
|
247
240
|
// └─── Touch target (invisible input), shifted into the margin
|
248
241
|
.govuk-radios__input {
|
249
|
-
@include
|
242
|
+
@include _govuk-not-ie8 {
|
250
243
|
left: $input-offset * -1;
|
251
244
|
}
|
252
245
|
|
253
|
-
@include
|
246
|
+
@include _govuk-if-ie8 {
|
254
247
|
margin-left: $govuk-small-radios-size * -1;
|
255
248
|
}
|
256
249
|
}
|
@@ -7,6 +7,12 @@
|
|
7
7
|
@include govuk-font($size: 19, $line-height: 1.25);
|
8
8
|
|
9
9
|
box-sizing: border-box; // should this be global?
|
10
|
+
|
11
|
+
// This min-width was chosen because:
|
12
|
+
// - it makes the Select noticeably wider than it is taller (which is what users expect)
|
13
|
+
// - 11.5em matches the 'length-10' variant of the input component
|
14
|
+
// - it fits comfortably on screens as narrow as 240px wide
|
15
|
+
min-width: 11.5em;
|
10
16
|
max-width: 100%;
|
11
17
|
height: 40px;
|
12
18
|
@if $govuk-typography-use-rem {
|
@@ -15,6 +21,11 @@
|
|
15
21
|
padding: govuk-spacing(1); // was 5px 4px 4px - size of it should be adjusted to match other form elements
|
16
22
|
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
|
17
23
|
|
24
|
+
// Default user agent colours for selects can have low contrast,
|
25
|
+
// and may look disabled (#2435)
|
26
|
+
color: $govuk-text-colour;
|
27
|
+
background-color: govuk-colour("white");
|
28
|
+
|
18
29
|
&:focus {
|
19
30
|
outline: $govuk-focus-width solid $govuk-focus-colour;
|
20
31
|
// Ensure outline appears outside of the element
|
@@ -24,12 +35,18 @@
|
|
24
35
|
// since `outline` is already used for the yellow focus state.
|
25
36
|
box-shadow: inset 0 0 0 $govuk-border-width-form-element;
|
26
37
|
|
27
|
-
@include
|
38
|
+
@include _govuk-if-ie8 {
|
28
39
|
// IE8 doesn't support `box-shadow` so double the border with
|
29
40
|
// `border-width`.
|
30
41
|
border-width: $govuk-border-width-form-element * 2;
|
31
42
|
}
|
32
43
|
}
|
44
|
+
|
45
|
+
&:disabled {
|
46
|
+
opacity: .5;
|
47
|
+
color: inherit;
|
48
|
+
cursor: not-allowed;
|
49
|
+
}
|
33
50
|
}
|
34
51
|
|
35
52
|
.govuk-select option:active,
|
@@ -40,7 +57,7 @@
|
|
40
57
|
}
|
41
58
|
|
42
59
|
.govuk-select--error {
|
43
|
-
border: $govuk-
|
60
|
+
border-color: $govuk-error-colour;
|
44
61
|
|
45
62
|
&:focus {
|
46
63
|
border-color: $govuk-input-border-colour;
|
@@ -11,9 +11,7 @@
|
|
11
11
|
|
12
12
|
// Respect 'display cutout' safe area (avoids notches and rounded corners)
|
13
13
|
@supports (padding: unquote("max(calc(0px))")) {
|
14
|
-
$padding-safe-area-right: -webkit-calc(#{govuk-spacing(3)} + env(safe-area-inset-right));
|
15
14
|
$padding-safe-area-right: calc(#{govuk-spacing(3)} + env(safe-area-inset-right));
|
16
|
-
$padding-safe-area-left: -webkit-calc(#{govuk-spacing(3)} + env(safe-area-inset-left));
|
17
15
|
$padding-safe-area-left: calc(#{govuk-spacing(3)} + env(safe-area-inset-left));
|
18
16
|
|
19
17
|
// Use max() to pick largest padding, default or with safe area
|
@@ -28,9 +26,22 @@
|
|
28
26
|
background-color: $govuk-focus-colour;
|
29
27
|
|
30
28
|
// Undo unwanted changes when global styles are enabled
|
31
|
-
@if
|
29
|
+
@if $govuk-global-styles {
|
32
30
|
box-shadow: none;
|
33
31
|
}
|
34
32
|
}
|
35
33
|
}
|
34
|
+
|
35
|
+
.govuk-skip-link-focused-element {
|
36
|
+
&:focus {
|
37
|
+
// Remove the native visible focus indicator when the element is programmatically focused.
|
38
|
+
//
|
39
|
+
// We set the focus on the linked element (this is usually the <main> element) when the skip
|
40
|
+
// link is activated to improve screen reader announcements. However, we remove the visible
|
41
|
+
// focus indicator from the linked element because the user cannot interact with it.
|
42
|
+
//
|
43
|
+
// A related discussion: https://github.com/w3c/wcag/issues/1001
|
44
|
+
outline: none;
|
45
|
+
}
|
46
|
+
}
|
36
47
|
}
|