katalyst-govuk-formbuilder 1.3.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/assets/builds/katalyst/govuk/formbuilder.css +58 -5
  4. data/app/assets/builds/katalyst/govuk/formbuilder.js +98 -64
  5. data/app/assets/builds/katalyst/govuk/formbuilder.min.js +1 -1
  6. data/app/assets/stylesheets/katalyst/govuk/components/richtextarea/_index.scss +7 -6
  7. data/app/assets/stylesheets/katalyst/govuk/formbuilder.scss +1 -1
  8. data/lib/katalyst/govuk/formbuilder/engine.rb +1 -0
  9. data/lib/katalyst/govuk/formbuilder/version.rb +1 -1
  10. data/vendor/assets/stylesheets/govuk-frontend/govuk/_base.scss +3 -0
  11. data/vendor/assets/stylesheets/govuk-frontend/govuk/all-ie8.scss +14 -0
  12. data/vendor/assets/stylesheets/govuk-frontend/govuk/all.scss +9 -0
  13. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/_all.scss +34 -0
  14. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
  15. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_index.scss +392 -0
  16. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
  17. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  18. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
  19. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_index.scss +147 -0
  20. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_button.scss +2 -0
  21. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_index.scss +297 -0
  22. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
  23. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_index.scss +34 -0
  24. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
  25. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_index.scss +335 -0
  26. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  27. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_index.scss +49 -0
  28. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
  29. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  30. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_details.scss +2 -0
  31. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_index.scss +88 -0
  32. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
  33. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_index.scss +12 -0
  34. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
  35. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  36. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
  37. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  38. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
  39. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_index.scss +55 -0
  40. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
  41. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_index.scss +193 -0
  42. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_header.scss +2 -0
  43. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_index.scss +349 -0
  44. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
  45. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_index.scss +42 -0
  46. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_index.scss +193 -0
  47. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_input.scss +2 -0
  48. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  49. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
  50. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_index.scss +41 -0
  51. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_label.scss +2 -0
  52. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  53. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  54. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  55. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  56. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_index.scss +56 -0
  57. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
  58. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  59. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
  60. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_index.scss +349 -0
  61. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
  62. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_index.scss +66 -0
  63. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_select.scss +2 -0
  64. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_index.scss +47 -0
  65. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
  66. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_index.scss +276 -0
  67. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
  68. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_index.scss +71 -0
  69. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_table.scss +2 -0
  70. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  71. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
  72. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_index.scss +81 -0
  73. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
  74. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_index.scss +54 -0
  75. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
  76. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  77. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
  78. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_all.scss +6 -0
  79. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_global-styles.scss +19 -0
  80. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  81. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_links.scss +35 -0
  82. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_lists.scss +66 -0
  83. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_section-break.scss +56 -0
  84. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_typography.scss +186 -0
  85. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_all.scss +12 -0
  86. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
  87. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_colour.scss +98 -0
  88. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
  89. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss +33 -0
  90. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
  91. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_grid.scss +61 -0
  92. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_links.scss +429 -0
  93. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
  94. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
  95. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_spacing.scss +171 -0
  96. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_typography.scss +214 -0
  97. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
  98. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_all.scss +6 -0
  99. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_button-group.scss +85 -0
  100. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_form-group.scss +23 -0
  101. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_grid.scss +24 -0
  102. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_main-wrapper.scss +53 -0
  103. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_template.scss +32 -0
  104. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_width-container.scss +84 -0
  105. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_all.scss +5 -0
  106. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_display.scss +24 -0
  107. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_spacing.scss +102 -0
  108. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_text-align.scss +14 -0
  109. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_typography.scss +21 -0
  110. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_width.scss +46 -0
  111. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_all.scss +24 -0
  112. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_assets.scss +82 -0
  113. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
  114. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-organisations.scss +146 -0
  115. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-palette.scss +120 -0
  116. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_compatibility.scss +100 -0
  117. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
  118. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_ie8.scss +34 -0
  119. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_links.scss +66 -0
  120. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_measurements.scss +95 -0
  121. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
  122. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_spacing.scss +76 -0
  123. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
  124. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font.scss +112 -0
  125. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-responsive.scss +195 -0
  126. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  127. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_all.scss +7 -0
  128. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_compatibility.scss +50 -0
  129. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_exports.scss +33 -0
  130. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_font-url.scss +25 -0
  131. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_ie8.scss +87 -0
  132. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_image-url.scss +25 -0
  133. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
  134. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
  135. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_all.scss +2 -0
  136. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
  137. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
  138. data/vendor/assets/stylesheets/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
  139. metadata +132 -4
  140. data/app/assets/builds/katalyst/govuk/formbuilder.min.css +0 -1
@@ -0,0 +1,349 @@
1
+ @import "../error-message/index";
2
+ @import "../fieldset/index";
3
+ @import "../hint/index";
4
+ @import "../label/index";
5
+
6
+ @include govuk-exports("govuk/component/radios") {
7
+
8
+ $govuk-touch-target-size: 44px;
9
+ $govuk-radios-size: 40px;
10
+ $govuk-small-radios-size: 24px;
11
+ $govuk-radios-label-padding-left-right: govuk-spacing(3);
12
+ // When the default focus width is used on a curved edge it looks visually smaller.
13
+ // So for the circular radios we bump the default to make it look visually consistent.
14
+ $govuk-radios-focus-width: $govuk-focus-width + 1px;
15
+
16
+ .govuk-radios__item {
17
+ @include govuk-font($size: 19);
18
+
19
+ display: block;
20
+ position: relative;
21
+
22
+ min-height: $govuk-radios-size;
23
+
24
+ margin-bottom: govuk-spacing(2);
25
+ padding-left: $govuk-radios-size;
26
+
27
+ clear: left;
28
+ }
29
+
30
+ .govuk-radios__item:last-child,
31
+ .govuk-radios__item:last-of-type {
32
+ margin-bottom: 0;
33
+ }
34
+
35
+ .govuk-radios__input {
36
+ $input-offset: ($govuk-touch-target-size - $govuk-radios-size) / 2;
37
+
38
+ cursor: pointer;
39
+
40
+ // IE8 doesn’t support pseudo-elements, so we don’t want to hide native
41
+ // elements there.
42
+ @include _govuk-not-ie8 {
43
+ position: absolute;
44
+
45
+ z-index: 1;
46
+ top: $input-offset * -1;
47
+ left: $input-offset * -1;
48
+
49
+ width: $govuk-touch-target-size;
50
+ height: $govuk-touch-target-size;
51
+ margin: 0;
52
+
53
+ opacity: 0;
54
+ }
55
+
56
+ @include _govuk-if-ie8 {
57
+ margin-top: 10px;
58
+ margin-right: $govuk-radios-size / -2;
59
+ margin-left: $govuk-radios-size / -2;
60
+ float: left;
61
+
62
+ // add focus outline to input
63
+ &:focus {
64
+ outline: $govuk-focus-width solid $govuk-focus-colour;
65
+ }
66
+ }
67
+ }
68
+
69
+ .govuk-radios__label {
70
+ display: inline-block;
71
+ margin-bottom: 0;
72
+ padding: 8px $govuk-radios-label-padding-left-right govuk-spacing(1);
73
+ cursor: pointer;
74
+ // remove 300ms pause on mobile
75
+ -ms-touch-action: manipulation;
76
+ touch-action: manipulation;
77
+ }
78
+
79
+ // ( ) Radio ring
80
+ .govuk-radios__label:before {
81
+ content: "";
82
+ box-sizing: border-box;
83
+ position: absolute;
84
+ top: 0;
85
+ left: 0;
86
+
87
+ width: $govuk-radios-size;
88
+ height: $govuk-radios-size;
89
+
90
+ border: $govuk-border-width-form-element solid currentcolor;
91
+ border-radius: 50%;
92
+ background: transparent;
93
+ }
94
+
95
+ // • Radio button
96
+ //
97
+ // We create the 'button' entirely out of 'border' so that they remain
98
+ // 'filled' even when colours are overridden in the browser.
99
+ .govuk-radios__label:after {
100
+ content: "";
101
+
102
+ position: absolute;
103
+ top: govuk-spacing(2);
104
+ left: govuk-spacing(2);
105
+
106
+ width: 0;
107
+ height: 0;
108
+
109
+ border: govuk-spacing(2) solid currentcolor;
110
+ border-radius: 50%;
111
+ opacity: 0;
112
+ background: currentcolor;
113
+ }
114
+
115
+ .govuk-radios__hint {
116
+ display: block;
117
+ padding-right: $govuk-radios-label-padding-left-right;
118
+ padding-left: $govuk-radios-label-padding-left-right;
119
+ }
120
+
121
+ // Focused state
122
+ .govuk-radios__input:focus + .govuk-radios__label:before {
123
+ border-width: 4px;
124
+
125
+ // When colours are overridden, the yellow box-shadow becomes invisible
126
+ // which means the focus state is less obvious. By adding a transparent
127
+ // outline, which becomes solid (text-coloured) in that context, we ensure
128
+ // the focus remains clearly visible.
129
+ outline: $govuk-focus-width solid transparent;
130
+ outline-offset: 1px;
131
+
132
+ // When in an explicit forced-color mode, we can use the Highlight system
133
+ // color for the outline to better match focus states of native controls
134
+ @media screen and (forced-colors: active), (-ms-high-contrast: active) {
135
+ outline-color: Highlight;
136
+ }
137
+
138
+ box-shadow: 0 0 0 $govuk-radios-focus-width $govuk-focus-colour;
139
+ }
140
+
141
+ // Selected state
142
+ .govuk-radios__input:checked + .govuk-radios__label:after {
143
+ opacity: 1;
144
+ }
145
+
146
+ // Disabled state
147
+ .govuk-radios__input:disabled,
148
+ .govuk-radios__input:disabled + .govuk-radios__label {
149
+ cursor: not-allowed;
150
+ }
151
+
152
+ .govuk-radios__input:disabled + .govuk-radios__label,
153
+ .govuk-radios__input:disabled ~ .govuk-hint {
154
+ opacity: .5;
155
+ }
156
+
157
+ // =========================================================
158
+ // Inline radios
159
+ // =========================================================
160
+
161
+ .govuk-radios--inline {
162
+ @include govuk-media-query ($from: tablet) {
163
+ @include govuk-clearfix;
164
+
165
+ .govuk-radios__item {
166
+ margin-right: govuk-spacing(4);
167
+ float: left;
168
+ clear: none;
169
+ }
170
+ }
171
+ }
172
+
173
+ // =========================================================
174
+ // Dividers ('or')
175
+ // =========================================================
176
+
177
+ .govuk-radios__divider {
178
+ $govuk-divider-size: $govuk-radios-size !default;
179
+ @include govuk-font($size: 19);
180
+ @include govuk-text-colour;
181
+ width: $govuk-divider-size;
182
+ margin-bottom: govuk-spacing(2);
183
+ text-align: center;
184
+ }
185
+
186
+ // =========================================================
187
+ // Conditional reveals
188
+ // =========================================================
189
+
190
+ // The narrow border is used in the conditional reveals because the border has
191
+ // to be an even number in order to be centred under the 40px checkbox or radio.
192
+ $conditional-border-width: $govuk-border-width-narrow;
193
+ // Calculate the amount of padding needed to keep the border centered against the radios.
194
+ $conditional-border-padding: ($govuk-radios-size / 2) - ($conditional-border-width / 2);
195
+ // Move the border centered with the radios
196
+ $conditional-margin-left: $conditional-border-padding;
197
+ // Move the contents of the conditional inline with the label
198
+ $conditional-padding-left: $conditional-border-padding + $govuk-radios-label-padding-left-right;
199
+
200
+ .govuk-radios__conditional {
201
+ @include govuk-responsive-margin(4, "bottom");
202
+ margin-left: $conditional-margin-left;
203
+ padding-left: $conditional-padding-left;
204
+ border-left: $conditional-border-width solid $govuk-border-colour;
205
+
206
+ .js-enabled &--hidden {
207
+ display: none;
208
+ }
209
+
210
+ & > :last-child {
211
+ margin-bottom: 0;
212
+ }
213
+ }
214
+
215
+ // =========================================================
216
+ // Small checkboxes
217
+ // =========================================================
218
+
219
+ .govuk-radios--small {
220
+
221
+ $input-offset: ($govuk-touch-target-size - $govuk-small-radios-size) / 2;
222
+ $label-offset: $govuk-touch-target-size - $input-offset;
223
+
224
+ .govuk-radios__item {
225
+ @include govuk-clearfix;
226
+ min-height: 0;
227
+ margin-bottom: 0;
228
+ padding-left: $label-offset;
229
+ float: left;
230
+ }
231
+
232
+ // Shift the touch target into the left margin so that the visible edge of
233
+ // the control is aligned
234
+ //
235
+ // ┆Which colour is your favourite?
236
+ // ┌┆───┐
237
+ // │┆() │ Purple
238
+ // └┆▲──┘
239
+ // ▲┆└─ Radio pseudo element, aligned with margin
240
+ // └─── Touch target (invisible input), shifted into the margin
241
+ .govuk-radios__input {
242
+ @include _govuk-not-ie8 {
243
+ left: $input-offset * -1;
244
+ }
245
+
246
+ @include _govuk-if-ie8 {
247
+ margin-left: $govuk-small-radios-size * -1;
248
+ }
249
+ }
250
+
251
+ // Adjust the size and position of the label.
252
+ //
253
+ // Unlike larger radios, we also have to float the label in order to
254
+ // 'shrink' it, preventing the hover state from kicking in across the full
255
+ // width of the parent element.
256
+ .govuk-radios__label {
257
+ margin-top: -2px;
258
+ padding: 13px govuk-spacing(3) 13px 1px;
259
+ float: left;
260
+
261
+ @include govuk-media-query($from: tablet) {
262
+ padding: 11px govuk-spacing(3) 10px 1px;
263
+ }
264
+ }
265
+
266
+ // ( ) Radio ring
267
+ //
268
+ // Reduce the size of the control [1], vertically centering it within the
269
+ // touch target [2]
270
+ .govuk-radios__label:before {
271
+ top: $input-offset - $govuk-border-width-form-element; // 2
272
+ width: $govuk-small-radios-size; // 1
273
+ height: $govuk-small-radios-size; // 1
274
+ }
275
+
276
+ // • Radio button
277
+ //
278
+ // Reduce the size of the 'button' and center it within the ring
279
+ .govuk-radios__label:after {
280
+ top: 15px;
281
+ left: 7px;
282
+ border-width: 5px;
283
+ }
284
+
285
+ // Fix position of hint with small radios
286
+ //
287
+ // Do not use hints with small radios – because they're within the input
288
+ // wrapper they trigger the hover state, but clicking them doesn't actually
289
+ // activate the control.
290
+ //
291
+ // (If you do use them, they won't look completely broken... but seriously,
292
+ // don't use them)
293
+ .govuk-radios__hint {
294
+ padding: 0;
295
+ clear: both;
296
+ pointer-events: none;
297
+ }
298
+
299
+ // Align conditional reveals with small radios
300
+ .govuk-radios__conditional {
301
+ $margin-left: ($govuk-small-radios-size / 2) - ($conditional-border-width / 2);
302
+ margin-left: $margin-left;
303
+ padding-left: $label-offset - ($margin-left + $conditional-border-width);
304
+ clear: both;
305
+ }
306
+
307
+ .govuk-radios__divider {
308
+ width: $govuk-small-radios-size;
309
+ margin-bottom: govuk-spacing(1);
310
+ }
311
+
312
+ // Hover state for small radios.
313
+ //
314
+ // We use a hover state for small radios because the touch target size
315
+ // is so much larger than their visible size, and so we need to provide
316
+ // feedback to the user as to which radio they will select when their
317
+ // cursor is outside of the visible area.
318
+ .govuk-radios__item:hover .govuk-radios__input:not(:disabled) + .govuk-radios__label:before {
319
+ box-shadow: 0 0 0 $govuk-hover-width $govuk-hover-colour;
320
+ }
321
+
322
+ // Because we've overridden the border-shadow provided by the focus state,
323
+ // we need to redefine that too.
324
+ //
325
+ // We use two box shadows, one that restores the original focus state [1]
326
+ // and another that then applies the hover state [2].
327
+ .govuk-radios__item:hover .govuk-radios__input:focus + .govuk-radios__label:before {
328
+ box-shadow:
329
+ 0 0 0 $govuk-radios-focus-width $govuk-focus-colour, // 1
330
+ 0 0 0 $govuk-hover-width $govuk-hover-colour; // 2
331
+ }
332
+
333
+ // For devices that explicitly don't support hover, don't provide a hover
334
+ // state (e.g. on touch devices like iOS).
335
+ //
336
+ // We can't use `@media (hover: hover)` because we wouldn't get the hover
337
+ // state in browsers that don't support `@media (hover)` (like Internet
338
+ // Explorer) – so we have to 'undo' the hover state instead.
339
+ @media (hover: none), (pointer: coarse) {
340
+ .govuk-radios__item:hover .govuk-radios__input:not(:disabled) + .govuk-radios__label:before {
341
+ box-shadow: initial;
342
+ }
343
+
344
+ .govuk-radios__item:hover .govuk-radios__input:focus + .govuk-radios__label:before {
345
+ box-shadow: 0 0 0 $govuk-radios-focus-width $govuk-focus-colour;
346
+ }
347
+ }
348
+ }
349
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,66 @@
1
+ @import "../error-message/index";
2
+ @import "../hint/index";
3
+ @import "../label/index";
4
+
5
+ @include govuk-exports("govuk/component/select") {
6
+ .govuk-select {
7
+ @include govuk-font($size: 19, $line-height: 1.25);
8
+
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;
16
+ max-width: 100%;
17
+ height: 40px;
18
+ @if $govuk-typography-use-rem {
19
+ height: govuk-px-to-rem(40px);
20
+ }
21
+ padding: govuk-spacing(1); // was 5px 4px 4px - size of it should be adjusted to match other form elements
22
+ border: $govuk-border-width-form-element solid $govuk-input-border-colour;
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
+
29
+ &:focus {
30
+ outline: $govuk-focus-width solid $govuk-focus-colour;
31
+ // Ensure outline appears outside of the element
32
+ outline-offset: 0;
33
+ // Double the border by adding its width again. Use `box-shadow` to do
34
+ // this instead of changing `border-width` (which changes element size) and
35
+ // since `outline` is already used for the yellow focus state.
36
+ box-shadow: inset 0 0 0 $govuk-border-width-form-element;
37
+
38
+ @include _govuk-if-ie8 {
39
+ // IE8 doesn't support `box-shadow` so double the border with
40
+ // `border-width`.
41
+ border-width: $govuk-border-width-form-element * 2;
42
+ }
43
+ }
44
+
45
+ &:disabled {
46
+ opacity: .5;
47
+ color: inherit;
48
+ cursor: not-allowed;
49
+ }
50
+ }
51
+
52
+ .govuk-select option:active,
53
+ .govuk-select option:checked,
54
+ .govuk-select:focus::-ms-value {
55
+ color: govuk-colour("white");
56
+ background-color: govuk-colour("blue");
57
+ }
58
+
59
+ .govuk-select--error {
60
+ border-color: $govuk-error-colour;
61
+
62
+ &:focus {
63
+ border-color: $govuk-input-border-colour;
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,47 @@
1
+ @include govuk-exports("govuk/component/skip-link") {
2
+ .govuk-skip-link {
3
+ @include govuk-visually-hidden-focusable;
4
+ @include govuk-typography-common;
5
+ @include govuk-link-decoration;
6
+ @include govuk-link-style-text;
7
+ @include govuk-typography-responsive($size: 16);
8
+
9
+ display: block;
10
+ padding: govuk-spacing(2) govuk-spacing(3);
11
+
12
+ // Respect 'display cutout' safe area (avoids notches and rounded corners)
13
+ @supports (padding: unquote("max(calc(0px))")) {
14
+ $padding-safe-area-right: calc(#{govuk-spacing(3)} + env(safe-area-inset-right));
15
+ $padding-safe-area-left: calc(#{govuk-spacing(3)} + env(safe-area-inset-left));
16
+
17
+ // Use max() to pick largest padding, default or with safe area
18
+ // Escaped due to Sass max() vs. CSS native max()
19
+ padding-right: unquote("max(#{govuk-spacing(3)}, #{$padding-safe-area-right})");
20
+ padding-left: unquote("max(#{govuk-spacing(3)}, #{$padding-safe-area-left})");
21
+ }
22
+
23
+ &:focus {
24
+ outline: $govuk-focus-width solid $govuk-focus-colour;
25
+ outline-offset: 0;
26
+ background-color: $govuk-focus-colour;
27
+
28
+ // Undo unwanted changes when global styles are enabled
29
+ @if $govuk-global-styles {
30
+ box-shadow: none;
31
+ }
32
+ }
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
+ }
47
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";