katalyst-govuk-formbuilder 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/katalyst/govuk/formbuilder.scss +1 -1
  3. data/lib/katalyst/govuk/formbuilder/engine.rb +1 -0
  4. data/lib/katalyst/govuk/formbuilder/version.rb +1 -1
  5. data/vendor/assets/stylesheets/govuk-frontend/govuk/_base.scss +3 -0
  6. data/vendor/assets/stylesheets/govuk-frontend/govuk/all-ie8.scss +6 -0
  7. data/vendor/assets/stylesheets/govuk-frontend/govuk/all.scss +9 -0
  8. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/_all.scss +34 -0
  9. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
  10. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_index.scss +392 -0
  11. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
  12. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  13. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
  14. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_index.scss +147 -0
  15. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_button.scss +2 -0
  16. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_index.scss +295 -0
  17. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
  18. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_index.scss +34 -0
  19. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
  20. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_index.scss +335 -0
  21. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  22. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_index.scss +49 -0
  23. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
  24. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  25. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_details.scss +2 -0
  26. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_index.scss +88 -0
  27. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
  28. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_index.scss +12 -0
  29. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
  30. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  31. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
  32. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  33. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
  34. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_index.scss +50 -0
  35. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
  36. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_index.scss +200 -0
  37. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_header.scss +2 -0
  38. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_index.scss +349 -0
  39. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
  40. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_index.scss +42 -0
  41. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_index.scss +181 -0
  42. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_input.scss +2 -0
  43. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  44. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
  45. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_index.scss +41 -0
  46. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_label.scss +2 -0
  47. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  48. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  49. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  50. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  51. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_index.scss +56 -0
  52. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
  53. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  54. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
  55. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_index.scss +349 -0
  56. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
  57. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_index.scss +60 -0
  58. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_select.scss +2 -0
  59. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_index.scss +47 -0
  60. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
  61. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_index.scss +276 -0
  62. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
  63. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_index.scss +71 -0
  64. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_table.scss +2 -0
  65. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  66. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
  67. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_index.scss +81 -0
  68. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
  69. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
  70. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
  71. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  72. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
  73. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_all.scss +5 -0
  74. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_global-styles.scss +19 -0
  75. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_links.scss +35 -0
  76. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_lists.scss +66 -0
  77. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_section-break.scss +56 -0
  78. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_typography.scss +186 -0
  79. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_all.scss +12 -0
  80. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
  81. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_colour.scss +95 -0
  82. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
  83. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss +33 -0
  84. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
  85. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_grid.scss +61 -0
  86. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_links.scss +429 -0
  87. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
  88. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
  89. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_spacing.scss +171 -0
  90. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_typography.scss +214 -0
  91. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
  92. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_all.scss +6 -0
  93. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_button-group.scss +85 -0
  94. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_form-group.scss +23 -0
  95. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_grid.scss +24 -0
  96. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_main-wrapper.scss +53 -0
  97. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_template.scss +32 -0
  98. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_width-container.scss +84 -0
  99. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_all.scss +5 -0
  100. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_display.scss +24 -0
  101. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_spacing.scss +102 -0
  102. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_text-align.scss +14 -0
  103. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_typography.scss +21 -0
  104. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_width.scss +46 -0
  105. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_all.scss +24 -0
  106. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_assets.scss +82 -0
  107. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
  108. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-organisations.scss +142 -0
  109. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-palette.scss +120 -0
  110. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_compatibility.scss +100 -0
  111. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
  112. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_ie8.scss +18 -0
  113. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_links.scss +62 -0
  114. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_measurements.scss +95 -0
  115. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
  116. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_spacing.scss +76 -0
  117. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
  118. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font.scss +112 -0
  119. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-responsive.scss +195 -0
  120. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  121. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_all.scss +7 -0
  122. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_compatibility.scss +50 -0
  123. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_exports.scss +33 -0
  124. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_font-url.scss +25 -0
  125. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_ie8.scss +51 -0
  126. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_image-url.scss +25 -0
  127. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
  128. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
  129. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_all.scss +2 -0
  130. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
  131. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
  132. data/vendor/assets/stylesheets/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
  133. metadata +130 -3
  134. data/app/assets/builds/katalyst/govuk/formbuilder.min.css +0 -1
@@ -0,0 +1,335 @@
1
+ @import "../error-message/index";
2
+ @import "../fieldset/index";
3
+ @import "../hint/index";
4
+ @import "../label/index";
5
+
6
+ @include govuk-exports("govuk/component/checkboxes") {
7
+
8
+ $govuk-touch-target-size: 44px;
9
+ $govuk-checkboxes-size: 40px;
10
+ $govuk-small-checkboxes-size: 24px;
11
+ $govuk-checkboxes-label-padding-left-right: govuk-spacing(3);
12
+
13
+ .govuk-checkboxes__item {
14
+ @include govuk-font($size: 19);
15
+
16
+ display: block;
17
+ position: relative;
18
+
19
+ min-height: $govuk-checkboxes-size;
20
+
21
+ margin-bottom: govuk-spacing(2);
22
+ padding-left: $govuk-checkboxes-size;
23
+
24
+ clear: left;
25
+ }
26
+
27
+ .govuk-checkboxes__item:last-child,
28
+ .govuk-checkboxes__item:last-of-type {
29
+ margin-bottom: 0;
30
+ }
31
+
32
+ .govuk-checkboxes__input {
33
+ $input-offset: ($govuk-touch-target-size - $govuk-checkboxes-size) / 2;
34
+
35
+ cursor: pointer;
36
+
37
+ // IE8 doesn’t support pseudo-elements, so we don’t want to hide native
38
+ // elements there.
39
+ @include govuk-not-ie8 {
40
+ position: absolute;
41
+
42
+ z-index: 1;
43
+ top: $input-offset * -1;
44
+ left: $input-offset * -1;
45
+
46
+ width: $govuk-touch-target-size;
47
+ height: $govuk-touch-target-size;
48
+ margin: 0;
49
+
50
+ opacity: 0;
51
+ }
52
+
53
+ @include govuk-if-ie8 {
54
+ margin-top: 10px;
55
+ margin-right: $govuk-checkboxes-size / -2;
56
+ margin-left: $govuk-checkboxes-size / -2;
57
+ float: left;
58
+
59
+ // add focus outline to input
60
+ &:focus {
61
+ outline: $govuk-focus-width solid $govuk-focus-colour;
62
+ }
63
+ }
64
+ }
65
+
66
+ .govuk-checkboxes__label {
67
+ display: inline-block;
68
+ margin-bottom: 0;
69
+ padding: 8px $govuk-checkboxes-label-padding-left-right govuk-spacing(1);
70
+ cursor: pointer;
71
+ // remove 300ms pause on mobile
72
+ -ms-touch-action: manipulation;
73
+ touch-action: manipulation;
74
+ }
75
+
76
+ @include govuk-not-ie8 {
77
+ // [ ] Check box
78
+ .govuk-checkboxes__label:before {
79
+ content: "";
80
+ box-sizing: border-box;
81
+ position: absolute;
82
+ top: 0;
83
+ left: 0;
84
+ width: $govuk-checkboxes-size;
85
+ height: $govuk-checkboxes-size;
86
+ border: $govuk-border-width-form-element solid currentcolor;
87
+ background: transparent;
88
+ }
89
+
90
+ // ✔ Check mark
91
+ //
92
+ // The check mark is a box with a border on the left and bottom side (└──),
93
+ // rotated 45 degrees
94
+ .govuk-checkboxes__label:after {
95
+ content: "";
96
+ box-sizing: border-box;
97
+
98
+ position: absolute;
99
+ top: 11px;
100
+ left: 9px;
101
+ width: 23px;
102
+ height: 12px;
103
+
104
+ -webkit-transform: rotate(-45deg);
105
+
106
+ -ms-transform: rotate(-45deg);
107
+
108
+ transform: rotate(-45deg);
109
+ border: solid;
110
+ border-width: 0 0 5px 5px;
111
+ // Fix bug in IE11 caused by transform rotate (-45deg).
112
+ // See: alphagov/govuk_elements/issues/518
113
+ border-top-color: transparent;
114
+
115
+ opacity: 0;
116
+
117
+ background: transparent;
118
+ }
119
+ }
120
+
121
+ .govuk-checkboxes__hint {
122
+ display: block;
123
+ padding-right: $govuk-checkboxes-label-padding-left-right;
124
+ padding-left: $govuk-checkboxes-label-padding-left-right;
125
+ }
126
+
127
+ // Focused state
128
+ .govuk-checkboxes__input:focus + .govuk-checkboxes__label:before {
129
+ border-width: 4px;
130
+
131
+ // When colours are overridden, the yellow box-shadow becomes invisible
132
+ // which means the focus state is less obvious. By adding a transparent
133
+ // outline, which becomes solid (text-coloured) in that context, we ensure
134
+ // the focus remains clearly visible.
135
+ outline: $govuk-focus-width solid transparent;
136
+ outline-offset: 1px;
137
+
138
+ // When in an explicit forced-color mode, we can use the Highlight system
139
+ // color for the outline to better match focus states of native controls
140
+ @media screen and (forced-colors: active), (-ms-high-contrast: active) {
141
+ outline-color: Highlight;
142
+ }
143
+
144
+ box-shadow: 0 0 0 $govuk-focus-width $govuk-focus-colour;
145
+ }
146
+
147
+ // Selected state
148
+ .govuk-checkboxes__input:checked + .govuk-checkboxes__label:after {
149
+ opacity: 1;
150
+ }
151
+
152
+ // Disabled state
153
+ .govuk-checkboxes__input:disabled,
154
+ .govuk-checkboxes__input:disabled + .govuk-checkboxes__label {
155
+ cursor: default;
156
+ }
157
+
158
+ .govuk-checkboxes__input:disabled + .govuk-checkboxes__label,
159
+ .govuk-checkboxes__input:disabled ~ .govuk-hint {
160
+ opacity: .5;
161
+ }
162
+
163
+ // =========================================================
164
+ // Dividers ('or')
165
+ // =========================================================
166
+
167
+ .govuk-checkboxes__divider {
168
+ $govuk-divider-size: $govuk-checkboxes-size !default;
169
+ @include govuk-font($size: 19);
170
+ @include govuk-text-colour;
171
+ width: $govuk-divider-size;
172
+ margin-bottom: govuk-spacing(2);
173
+ text-align: center;
174
+ }
175
+
176
+ // =========================================================
177
+ // Conditional reveals
178
+ // =========================================================
179
+
180
+ // The narrow border is used in the conditional reveals because the border has
181
+ // to be an even number in order to be centred under the 40px checkbox or radio.
182
+ $conditional-border-width: $govuk-border-width-narrow;
183
+ // Calculate the amount of padding needed to keep the border centered against the checkbox.
184
+ $conditional-border-padding: ($govuk-checkboxes-size / 2) - ($conditional-border-width / 2);
185
+ // Move the border centered with the checkbox
186
+ $conditional-margin-left: $conditional-border-padding;
187
+ // Move the contents of the conditional inline with the label
188
+ $conditional-padding-left: $conditional-border-padding + $govuk-checkboxes-label-padding-left-right;
189
+
190
+ .govuk-checkboxes__conditional {
191
+ @include govuk-responsive-margin(4, "bottom");
192
+ margin-left: $conditional-margin-left;
193
+ padding-left: $conditional-padding-left;
194
+ border-left: $conditional-border-width solid $govuk-border-colour;
195
+
196
+ .js-enabled &--hidden {
197
+ display: none;
198
+ }
199
+
200
+ & > :last-child {
201
+ margin-bottom: 0;
202
+ }
203
+ }
204
+
205
+ // =========================================================
206
+ // Small checkboxes
207
+ // =========================================================
208
+
209
+ .govuk-checkboxes--small {
210
+
211
+ $input-offset: ($govuk-touch-target-size - $govuk-small-checkboxes-size) / 2;
212
+ $label-offset: $govuk-touch-target-size - $input-offset;
213
+
214
+ .govuk-checkboxes__item {
215
+ @include govuk-clearfix;
216
+ min-height: 0;
217
+ margin-bottom: 0;
218
+ padding-left: $label-offset;
219
+ float: left;
220
+ }
221
+
222
+ // Shift the touch target into the left margin so that the visible edge of
223
+ // the control is aligned
224
+ //
225
+ // ┆What colours do you like?
226
+ // ┌┆───┐
227
+ // │┆[] │ Purple
228
+ // └┆▲──┘
229
+ // ▲┆└─ Check box pseudo element, aligned with margin
230
+ // └─── Touch target (invisible input), shifted into the margin
231
+ .govuk-checkboxes__input {
232
+ @include govuk-not-ie8 {
233
+ left: $input-offset * -1;
234
+ }
235
+
236
+ @include govuk-if-ie8 {
237
+ margin-left: $govuk-small-checkboxes-size * -1;
238
+ }
239
+ }
240
+
241
+ // Adjust the size and position of the label.
242
+ //
243
+ // Unlike larger checkboxes, we also have to float the label in order to
244
+ // 'shrink' it, preventing the hover state from kicking in across the full
245
+ // width of the parent element.
246
+ .govuk-checkboxes__label {
247
+ margin-top: -2px;
248
+ padding: 13px govuk-spacing(3) 13px 1px;
249
+ float: left;
250
+
251
+ @include govuk-media-query($from: tablet) {
252
+ padding: 11px govuk-spacing(3) 10px 1px;
253
+ }
254
+ }
255
+
256
+ // [ ] Check box
257
+ //
258
+ // Reduce the size of the check box [1], vertically center it within the
259
+ // touch target [2]
260
+ .govuk-checkboxes__label:before {
261
+ top: $input-offset - $govuk-border-width-form-element; // 2
262
+ width: $govuk-small-checkboxes-size; // 1
263
+ height: $govuk-small-checkboxes-size; // 1
264
+ }
265
+
266
+ // ✔ Check mark
267
+ //
268
+ // Reduce the size of the check mark and re-align within the checkbox
269
+ .govuk-checkboxes__label:after {
270
+ top: 15px;
271
+ left: 6px;
272
+ width: 12px;
273
+ height: 6.5px;
274
+ border-width: 0 0 3px 3px;
275
+ }
276
+
277
+ // Fix position of hint with small checkboxes
278
+ //
279
+ // Do not use hints with small checkboxes – because they're within the input
280
+ // wrapper they trigger the hover state, but clicking them doesn't actually
281
+ // activate the control.
282
+ //
283
+ // (If you do use them, they won't look completely broken... but seriously,
284
+ // don't use them)
285
+ .govuk-checkboxes__hint {
286
+ padding: 0;
287
+ clear: both;
288
+ }
289
+
290
+ // Align conditional reveals with small checkboxes
291
+ .govuk-checkboxes__conditional {
292
+ $margin-left: ($govuk-small-checkboxes-size / 2) - ($conditional-border-width / 2);
293
+ margin-left: $margin-left;
294
+ padding-left: $label-offset - ($margin-left + $conditional-border-width);
295
+ clear: both;
296
+ }
297
+
298
+ // Hover state for small checkboxes.
299
+ //
300
+ // We use a hover state for small checkboxes because the touch target size
301
+ // is so much larger than their visible size, and so we need to provide
302
+ // feedback to the user as to which checkbox they will select when their
303
+ // cursor is outside of the visible area.
304
+ .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled) + .govuk-checkboxes__label:before {
305
+ box-shadow: 0 0 0 $govuk-hover-width $govuk-hover-colour;
306
+ }
307
+
308
+ // Because we've overridden the border-shadow provided by the focus state,
309
+ // we need to redefine that too.
310
+ //
311
+ // We use two box shadows, one that restores the original focus state [1]
312
+ // and another that then applies the hover state [2].
313
+ .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus + .govuk-checkboxes__label:before {
314
+ box-shadow:
315
+ 0 0 0 $govuk-focus-width $govuk-focus-colour, // 1
316
+ 0 0 0 $govuk-hover-width $govuk-hover-colour; // 2
317
+ }
318
+
319
+ // For devices that explicitly don't support hover, don't provide a hover
320
+ // state (e.g. on touch devices like iOS).
321
+ //
322
+ // We can't use `@media (hover: hover)` because we wouldn't get the hover
323
+ // state in browsers that don't support `@media (hover)` (like Internet
324
+ // Explorer) – so we have to 'undo' the hover state instead.
325
+ @media (hover: none), (pointer: coarse) {
326
+ .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled) + .govuk-checkboxes__label:before {
327
+ box-shadow: initial;
328
+ }
329
+
330
+ .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus + .govuk-checkboxes__label:before {
331
+ box-shadow: 0 0 0 $govuk-focus-width $govuk-focus-colour;
332
+ }
333
+ }
334
+ }
335
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,49 @@
1
+ @include govuk-exports("govuk/component/cookie-banner") {
2
+
3
+ // This needs to be kept in sync with the header component's styles
4
+ $border-bottom-width: govuk-spacing(2);
5
+
6
+ .govuk-cookie-banner {
7
+ padding-top: govuk-spacing(4);
8
+ // The component does not set bottom spacing.
9
+ // The bottom spacing should be created by the items inside the component.
10
+
11
+ // Visually separate the cookie banner from content underneath
12
+ // when user changes colours in their browser.
13
+ border-bottom: $border-bottom-width solid transparent;
14
+
15
+ background-color: govuk-colour("light-grey", $legacy: "grey-3");
16
+ }
17
+
18
+ // Support older browsers which don't hide elements with the `hidden` attribute
19
+ // when user hides the whole cookie banner with a 'Hide' button.
20
+ .govuk-cookie-banner[hidden] {
21
+ display: none;
22
+ }
23
+
24
+ .govuk-cookie-banner__message {
25
+ // Remove the extra height added by the separator border.
26
+ margin-bottom: -$border-bottom-width;
27
+
28
+ &[hidden] {
29
+ // Support older browsers which don't hide elements with the `hidden` attribute
30
+ // when the visibility of cookie and replacement messages is toggled.
31
+ display: none;
32
+ }
33
+
34
+ &:focus {
35
+ // Remove the native visible focus indicator when the element is programmatically focused.
36
+ //
37
+ // The focused cookie banner is the first element on the page and the last thing the user
38
+ // interacted with prior to it gaining focus.
39
+ // We therefore assume that moving focus to it is not going to surprise users, and that giving
40
+ // it a visible focus indicator could be more confusing than helpful, especially as the
41
+ // element is not normally keyboard operable.
42
+ //
43
+ // We have flagged this in the research section of the guidance as something to monitor.
44
+ //
45
+ // A related discussion: https://github.com/w3c/wcag/issues/1001
46
+ outline: none;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,26 @@
1
+ @import "../error-message/index";
2
+ @import "../input/index";
3
+ @import "../hint/index";
4
+ @import "../label/index";
5
+
6
+ @include govuk-exports("govuk/component/date-input") {
7
+ .govuk-date-input {
8
+ @include govuk-clearfix;
9
+ // font-size: 0 removes whitespace caused by inline-block
10
+ font-size: 0;
11
+ }
12
+
13
+ .govuk-date-input__item {
14
+ display: inline-block;
15
+ margin-right: govuk-spacing(4);
16
+ margin-bottom: 0;
17
+ }
18
+
19
+ .govuk-date-input__label {
20
+ display: block;
21
+ }
22
+
23
+ .govuk-date-input__input {
24
+ margin-bottom: 0;
25
+ }
26
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,88 @@
1
+ @include govuk-exports("govuk/component/details") {
2
+ .govuk-details {
3
+ @include govuk-font($size: 19);
4
+ @include govuk-text-colour;
5
+ @include govuk-responsive-margin(6, "bottom");
6
+
7
+ display: block;
8
+ }
9
+
10
+ .govuk-details__summary {
11
+ // Make the focus outline shrink-wrap the text content of the summary
12
+ display: inline-block;
13
+
14
+ // Absolutely position the marker against this element
15
+ position: relative;
16
+
17
+ margin-bottom: govuk-spacing(1);
18
+
19
+ // Allow for absolutely positioned marker and align with disclosed text
20
+ padding-left: govuk-spacing(4) + $govuk-border-width;
21
+
22
+ // Style the summary to look like a link...
23
+ color: $govuk-link-colour;
24
+ cursor: pointer;
25
+
26
+ &:hover {
27
+ color: $govuk-link-hover-colour;
28
+ }
29
+
30
+ &:focus {
31
+ @include govuk-focused-text;
32
+ }
33
+ }
34
+
35
+ // ...but only underline the text, not the arrow
36
+ .govuk-details__summary-text {
37
+ @include govuk-link-decoration;
38
+ }
39
+
40
+ .govuk-details__summary:hover .govuk-details__summary-text {
41
+ @include govuk-link-hover-decoration;
42
+ }
43
+
44
+ // Remove the underline when focussed to avoid duplicate borders
45
+ .govuk-details__summary:focus .govuk-details__summary-text {
46
+ text-decoration: none;
47
+ }
48
+
49
+ // Remove the default details marker so we can style our own consistently and
50
+ // ensure it displays in Firefox (see implementation.md for details)
51
+ .govuk-details__summary::-webkit-details-marker {
52
+ display: none;
53
+ }
54
+
55
+ // Append our own open / closed marker using a pseudo-element
56
+ .govuk-details__summary:before {
57
+ content: "";
58
+ position: absolute;
59
+
60
+ top: -1px;
61
+ bottom: 0;
62
+ left: 0;
63
+
64
+ margin: auto;
65
+
66
+ @include govuk-shape-arrow($direction: right, $base: 14px);
67
+
68
+ .govuk-details[open] > & {
69
+ @include govuk-shape-arrow($direction: down, $base: 14px);
70
+ }
71
+ }
72
+
73
+ .govuk-details__text {
74
+ padding-top: govuk-spacing(3);
75
+ padding-bottom: govuk-spacing(3);
76
+ padding-left: govuk-spacing(4);
77
+ border-left: $govuk-border-width solid $govuk-border-colour;
78
+ }
79
+
80
+ .govuk-details__text p {
81
+ margin-top: 0;
82
+ margin-bottom: govuk-spacing(4);
83
+ }
84
+
85
+ .govuk-details__text > :last-child {
86
+ margin-bottom: 0;
87
+ }
88
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,12 @@
1
+ @include govuk-exports("govuk/component/error-message") {
2
+ .govuk-error-message {
3
+ @include govuk-font($size: 19, $weight: bold);
4
+
5
+ display: block;
6
+ margin-top: 0; // Reset any default browser margins for paragraphs
7
+ margin-bottom: govuk-spacing(3);
8
+ clear: both;
9
+
10
+ color: $govuk-error-colour;
11
+ }
12
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,43 @@
1
+ @import "../../core/lists";
2
+
3
+ @include govuk-exports("govuk/component/error-summary") {
4
+ .govuk-error-summary {
5
+ @include govuk-text-colour;
6
+ @include govuk-responsive-padding(4);
7
+ @include govuk-responsive-margin(8, "bottom");
8
+
9
+ border: $govuk-border-width solid $govuk-error-colour;
10
+
11
+ &:focus {
12
+ outline: $govuk-focus-width solid $govuk-focus-colour;
13
+ }
14
+ }
15
+
16
+ .govuk-error-summary__title {
17
+ @include govuk-font($size: 24, $weight: bold);
18
+
19
+ margin-top: 0;
20
+ @include govuk-responsive-margin(4, "bottom");
21
+ }
22
+
23
+ .govuk-error-summary__body {
24
+ @include govuk-font($size: 19);
25
+
26
+ p {
27
+ margin-top: 0;
28
+ @include govuk-responsive-margin(4, "bottom");
29
+ }
30
+ }
31
+
32
+ // Cross-component class - adjusts styling of list component
33
+ .govuk-error-summary__list {
34
+ margin-top: 0;
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ .govuk-error-summary__list a {
39
+ @include govuk-typography-weight-bold;
40
+ @include govuk-link-common;
41
+ @include govuk-link-style-error;
42
+ }
43
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,64 @@
1
+ @include govuk-exports("govuk/component/fieldset") {
2
+ .govuk-fieldset {
3
+ min-width: 0;
4
+ margin: 0;
5
+ padding: 0;
6
+ border: 0;
7
+ @include govuk-clearfix;
8
+ }
9
+
10
+ // Fix for Firefox < 53
11
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=504622
12
+ @supports not (caret-color: auto) {
13
+ .govuk-fieldset,
14
+ x:-moz-any-link { // stylelint-disable-line selector-type-no-unknown
15
+ display: table-cell;
16
+ }
17
+ }
18
+
19
+ .govuk-fieldset__legend {
20
+ @include govuk-font($size: 19);
21
+ @include govuk-text-colour;
22
+
23
+ // Fix legend text wrapping in Edge and IE
24
+ // 1. IE9-11 & Edge 12-13
25
+ // 2. IE8-11
26
+ box-sizing: border-box; // 1
27
+ display: table; // 2
28
+ max-width: 100%; // 1
29
+ margin-bottom: govuk-spacing(2);
30
+ padding: 0;
31
+
32
+ white-space: normal; // 1
33
+ }
34
+
35
+ // Modifiers that make legends look more like their equivalent headings
36
+
37
+ .govuk-fieldset__legend--xl {
38
+ @include govuk-font($size: 48, $weight: bold);
39
+ margin-bottom: govuk-spacing(3);
40
+ }
41
+
42
+ .govuk-fieldset__legend--l {
43
+ @include govuk-font($size: 36, $weight: bold);
44
+ margin-bottom: govuk-spacing(3);
45
+ }
46
+
47
+ .govuk-fieldset__legend--m {
48
+ @include govuk-font($size: 24, $weight: bold);
49
+ margin-bottom: govuk-spacing(3);
50
+ }
51
+
52
+ .govuk-fieldset__legend--s {
53
+ @include govuk-font($size: 19, $weight: bold);
54
+ }
55
+
56
+ // When the legend contains an H1, we want the H1 to inherit all styles from
57
+ // the legend. Effectively we want to be able to treat the heading as if it is
58
+ // not there.
59
+ .govuk-fieldset__heading {
60
+ margin: 0;
61
+ font-size: inherit;
62
+ font-weight: inherit;
63
+ }
64
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";