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,392 @@
1
+ @include govuk-exports("govuk/component/accordion") {
2
+ $govuk-accordion-base-colour: govuk-colour("black");
3
+ $govuk-accordion-hover-colour: govuk-colour("light-grey", $legacy: "grey-3");
4
+ $govuk-accordion-icon-focus-colour: $govuk-focus-colour;
5
+ $govuk-accordion-bottom-border-width: 1px;
6
+
7
+ .govuk-accordion {
8
+ @include govuk-responsive-margin(6, "bottom");
9
+ }
10
+
11
+ .govuk-accordion__section {
12
+ padding-top: govuk-spacing(3);
13
+ }
14
+
15
+ .govuk-accordion__section-heading {
16
+ // Override browser defaults to ensure consistent element height
17
+ margin-top: 0;
18
+ margin-bottom: 0;
19
+
20
+ padding-top: govuk-spacing(3);
21
+ padding-bottom: govuk-spacing(3);
22
+ }
23
+
24
+ .govuk-accordion__section-button {
25
+ @include govuk-font($size: 24, $weight: bold);
26
+ @include govuk-text-colour;
27
+
28
+ display: block;
29
+ margin-bottom: 0;
30
+ padding-top: govuk-spacing(3);
31
+ }
32
+
33
+ // Remove the bottom margin from the last item inside the content
34
+ .govuk-accordion__section-content > :last-child {
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ // JavaScript enabled
39
+ .js-enabled {
40
+ .govuk-accordion {
41
+ // Border at the bottom of the whole accordion
42
+ border-bottom: $govuk-accordion-bottom-border-width solid $govuk-border-colour;
43
+ }
44
+
45
+ .govuk-accordion__section {
46
+ padding-top: 0;
47
+ }
48
+
49
+ // Hide the body of collapsed sections by default for browsers that lack
50
+ // support for `content-visibility` paired with [hidden=until-found]
51
+ .govuk-accordion__section-content {
52
+ display: none;
53
+
54
+ @include govuk-responsive-padding(3, "top");
55
+ @include govuk-responsive-padding(8, "bottom");
56
+ }
57
+
58
+ // Hide the body of collapsed sections using `content-visibility` to enable
59
+ // page search within [hidden=until-found] regions where browser supported
60
+ .govuk-accordion__section-content[hidden] {
61
+ @supports (content-visibility: hidden) {
62
+ content-visibility: hidden;
63
+ display: inherit;
64
+ }
65
+
66
+ // Hide the padding of collapsed sections
67
+ padding-top: 0;
68
+ padding-bottom: 0;
69
+ }
70
+
71
+ // Show the body of expanded sections
72
+ .govuk-accordion__section--expanded .govuk-accordion__section-content {
73
+ display: block;
74
+ }
75
+
76
+ .govuk-accordion__show-all {
77
+ @include govuk-font($size: 19);
78
+ position: relative;
79
+ z-index: 1;
80
+
81
+ margin-bottom: 9px;
82
+ padding: govuk-spacing(1) 2px govuk-spacing(1) 0;
83
+
84
+ border-width: 0;
85
+
86
+ color: $govuk-link-colour;
87
+ background: none;
88
+
89
+ cursor: pointer;
90
+ -webkit-appearance: none;
91
+
92
+ @include govuk-media-query ($from: tablet) {
93
+ margin-bottom: 14px;
94
+ }
95
+
96
+ // Remove default button focus outline in Firefox
97
+ &::-moz-focus-inner {
98
+ padding: 0;
99
+ border: 0;
100
+ }
101
+
102
+ &:hover {
103
+ color: $govuk-accordion-base-colour;
104
+ background: $govuk-accordion-hover-colour;
105
+ // The GOV.UK Design System focus state adds a box-shadow to the top and bottom of the
106
+ // button. We add a grey box-shadow on hover too, to make the height of the hover state
107
+ // match the height of the focus state.
108
+ box-shadow: 0 -2px $govuk-accordion-hover-colour, 0 4px $govuk-accordion-hover-colour;
109
+
110
+ .govuk-accordion__section-toggle-text {
111
+ color: $govuk-accordion-base-colour;
112
+ }
113
+
114
+ .govuk-accordion-nav__chevron {
115
+ color: $govuk-accordion-base-colour;
116
+ background: $govuk-accordion-base-colour;
117
+ }
118
+
119
+ .govuk-accordion-nav__chevron:after {
120
+ color: $govuk-accordion-hover-colour;
121
+ }
122
+ }
123
+
124
+ &:focus {
125
+ @include govuk-focused-text;
126
+
127
+ .govuk-accordion-nav__chevron {
128
+ background: $govuk-accordion-base-colour;
129
+ }
130
+
131
+ .govuk-accordion-nav__chevron:after {
132
+ color: $govuk-accordion-icon-focus-colour;
133
+ }
134
+ }
135
+ }
136
+
137
+ .govuk-accordion__section-heading {
138
+ padding: 0;
139
+ }
140
+
141
+ // Create Chevron icon aligned with text
142
+ .govuk-accordion-nav__chevron {
143
+ box-sizing: border-box;
144
+ display: inline-block;
145
+
146
+ position: relative;
147
+
148
+ // Set size using rems to make the icon scale with text if user resizes text in their browser
149
+ width: govuk-px-to-rem(20px);
150
+ height: govuk-px-to-rem(20px);
151
+
152
+ border: govuk-px-to-rem(1px) solid;
153
+ border-radius: 50%;
154
+
155
+ vertical-align: middle;
156
+
157
+ // IE8 fallback of icon
158
+ @include _govuk-if-ie8 {
159
+ display: inline-block;
160
+ max-height: 20px;
161
+ line-height: 1;
162
+ }
163
+
164
+ // Create inner chevron arrow
165
+ &:after {
166
+ content: "";
167
+ box-sizing: border-box;
168
+ display: block;
169
+
170
+ position: absolute;
171
+ bottom: govuk-px-to-rem(5px);
172
+ left: govuk-px-to-rem(6px);
173
+
174
+ width: govuk-px-to-rem(6px);
175
+ height: govuk-px-to-rem(6px);
176
+
177
+ -webkit-transform: rotate(-45deg);
178
+
179
+ -ms-transform: rotate(-45deg);
180
+
181
+ transform: rotate(-45deg);
182
+
183
+ border-top: govuk-px-to-rem(2px) solid;
184
+ border-right: govuk-px-to-rem(2px) solid;
185
+
186
+ // IE8 fallback of icon with HTML symbol
187
+ @include _govuk-if-ie8 {
188
+ content: "\25B2"; // "▲"
189
+ position: relative;
190
+ border: 0;
191
+ }
192
+ }
193
+ }
194
+
195
+ // Rotate icon to create "Down" version
196
+ .govuk-accordion-nav__chevron--down {
197
+ -webkit-transform: rotate(180deg);
198
+ -ms-transform: rotate(180deg);
199
+ transform: rotate(180deg);
200
+
201
+ // IE8 fallback of arrow icon
202
+ @include _govuk-if-ie8 {
203
+ &:after {
204
+ content: "\25BC"; // "▼"
205
+ -webkit-transform: none;
206
+ -ms-transform: none;
207
+ transform: none;
208
+ }
209
+ }
210
+ }
211
+
212
+ .govuk-accordion__section-button {
213
+ width: 100%;
214
+
215
+ padding: govuk-spacing(2) 0 0 0;
216
+
217
+ border: 0;
218
+
219
+ border-top: $govuk-accordion-bottom-border-width solid $govuk-border-colour;
220
+
221
+ // Visually separate the section from the one underneath when user changes colours in their
222
+ // browser. See https://github.com/alphagov/govuk-frontend/issues/2321#issuecomment-924201488
223
+ border-bottom: govuk-spacing(2) solid transparent;
224
+
225
+ color: $govuk-text-colour;
226
+ background: none;
227
+
228
+ text-align: left;
229
+ // Section headers have a pointer cursor as an additional affordance
230
+ cursor: pointer;
231
+ -webkit-appearance: none;
232
+
233
+ @include govuk-media-query ($from: tablet) {
234
+ padding-bottom: govuk-spacing(2);
235
+ }
236
+
237
+ &:active {
238
+ color: $govuk-link-active-colour;
239
+ background: none;
240
+ }
241
+
242
+ &:hover {
243
+ color: $govuk-accordion-base-colour;
244
+ background: $govuk-accordion-hover-colour;
245
+
246
+ .govuk-accordion__section-toggle-text {
247
+ color: $govuk-accordion-base-colour;
248
+ }
249
+
250
+ .govuk-accordion-nav__chevron {
251
+ color: $govuk-accordion-base-colour;
252
+ background: $govuk-accordion-base-colour;
253
+ }
254
+
255
+ .govuk-accordion-nav__chevron:after {
256
+ color: $govuk-accordion-hover-colour;
257
+ }
258
+ }
259
+
260
+ &:focus {
261
+ // Remove default focus border around button as
262
+ // styling is being applied to inner text elements that receive focus
263
+ outline: 0;
264
+
265
+ .govuk-accordion__section-heading-text-focus,
266
+ .govuk-accordion__section-summary-focus,
267
+ .govuk-accordion__section-toggle-focus {
268
+ @include govuk-focused-text;
269
+ }
270
+
271
+ .govuk-accordion-nav__chevron {
272
+ color: $govuk-accordion-base-colour;
273
+ background: $govuk-accordion-base-colour;
274
+ }
275
+
276
+ .govuk-accordion-nav__chevron:after {
277
+ color: $govuk-accordion-icon-focus-colour;
278
+ }
279
+ }
280
+
281
+ // Remove default button focus outline in Firefox
282
+ &::-moz-focus-inner {
283
+ padding: 0;
284
+ border: 0;
285
+ }
286
+ }
287
+
288
+ // Remove the transparent border when the section is expanded to make it clear that the heading
289
+ // relates to the content below. Adjust padding to maintain the height of the element.
290
+ // See https://github.com/alphagov/govuk-frontend/pull/2257#issuecomment-951920798
291
+ .govuk-accordion__section--expanded .govuk-accordion__section-button {
292
+ padding-bottom: govuk-spacing(3);
293
+ border-bottom: 0;
294
+
295
+ @include govuk-media-query ($from: tablet) {
296
+ padding-bottom: govuk-spacing(4);
297
+ }
298
+ }
299
+
300
+ // As Chevron icon is vertically aligned it overlaps with the focus state bottom border
301
+ // Styling adds some spacing
302
+ .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus {
303
+ padding-bottom: 3px;
304
+
305
+ @include govuk-media-query ($from: desktop) {
306
+ padding-bottom: 2px;
307
+ }
308
+ }
309
+
310
+ .govuk-accordion__section-toggle,
311
+ .govuk-accordion__section-heading-text,
312
+ .govuk-accordion__section-summary {
313
+ display: block;
314
+ margin-bottom: 13px;
315
+
316
+ .govuk-accordion__section-heading-text-focus,
317
+ .govuk-accordion__section-summary-focus,
318
+ .govuk-accordion__section-toggle-focus {
319
+ display: inline;
320
+ }
321
+ }
322
+
323
+ // Add toggle link with Chevron icon on left.
324
+ .govuk-accordion__section-toggle {
325
+ @include govuk-typography-responsive($size: 19);
326
+ @include govuk-typography-weight-regular;
327
+ color: $govuk-link-colour;
328
+ }
329
+
330
+ // Add space between the icon and text.
331
+ // Avoid applying spacing directly to the icon as the use of `transform` will change the
332
+ // placement of any margins.
333
+ .govuk-accordion__show-all-text,
334
+ .govuk-accordion__section-toggle-text {
335
+ margin-left: govuk-spacing(1);
336
+ vertical-align: middle;
337
+ }
338
+
339
+ // Background colour adjustment when user changes colours in Firefox
340
+ //
341
+ // When user changes colours in Firefox, text colour inside <button> is always black
342
+ // (regardless of the custom colours the user has set). This is fine when the text in the
343
+ // button is not nested inside another element because when user changes colours in Firefox,
344
+ // the immediate background colour of buttons is always white (again, regardless of user's
345
+ // custom colours).
346
+ //
347
+ // However, when the text inside <button> is wrapped inside another element AND that element
348
+ // sets a background colour, the text colour is still black but the background of that nested
349
+ // element gets the user's custom background colour. When the custom background is a lighter
350
+ // hue, the contrast might be sufficient. But if the user's custom background colour is a
351
+ // darker colour, the contrast with the text might not be sufficient.
352
+ //
353
+ // To ensure sufficient contrast, override the background colour set by the focus state on the
354
+ // nested elements to be transparent.
355
+ //
356
+ // Also override the background colour of the Show/Hide chevrons which set a background colour
357
+ // on hover.
358
+ @media screen and (forced-colors: active) {
359
+ .govuk-accordion__show-all:hover,
360
+ .govuk-accordion__section-button:hover {
361
+ .govuk-accordion-nav__chevron {
362
+ background-color: transparent;
363
+ }
364
+ }
365
+
366
+ .govuk-accordion__show-all:focus,
367
+ .govuk-accordion__section-button:focus {
368
+ .govuk-accordion__section-heading-text-focus,
369
+ .govuk-accordion__section-summary-focus,
370
+ .govuk-accordion__section-toggle-focus,
371
+ .govuk-accordion-nav__chevron {
372
+ background: transparent;
373
+ background-color: transparent;
374
+ }
375
+ }
376
+ }
377
+
378
+ // For devices that can't hover such as touch devices,
379
+ // remove hover state as it can be stuck in that state (iOS).
380
+ @media (hover: none) {
381
+ .govuk-accordion__section-header:hover {
382
+ border-top-color: $govuk-border-colour;
383
+
384
+ box-shadow: inset 0 3px 0 0 $govuk-link-colour;
385
+
386
+ .govuk-accordion__section-button {
387
+ border-top-color: $govuk-border-colour;
388
+ }
389
+ }
390
+ }
391
+ }
392
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,99 @@
1
+ @include govuk-exports("govuk/component/back-link") {
2
+ // Component font-size on the Frontend (used for calculations)
3
+ $font-size: 16;
4
+
5
+ // Size of chevron (excluding border)
6
+ $chevron-size: govuk-em(7px, $font-size);
7
+
8
+ // Size of chevron border
9
+ $chevron-border-min-width: 1px;
10
+ $chevron-border-width: govuk-em($chevron-border-min-width, $font-size);
11
+
12
+ // Colour of chevron
13
+ $chevron-border-colour: $govuk-secondary-text-colour;
14
+
15
+ .govuk-back-link {
16
+ @include govuk-typography-responsive($size: $font-size);
17
+ @include govuk-link-common;
18
+ @include govuk-link-style-text;
19
+
20
+ display: inline-block;
21
+ position: relative;
22
+
23
+ margin-top: govuk-spacing(3);
24
+ margin-bottom: govuk-spacing(3);
25
+
26
+ // Allow space for the arrow
27
+ padding-left: govuk-em(14px, $font-size);
28
+ }
29
+
30
+ // Prepend left pointing chevron
31
+ .govuk-back-link:before {
32
+ content: "";
33
+ display: block;
34
+
35
+ // Vertically align with the parent element
36
+ position: absolute;
37
+
38
+ @if $govuk-use-legacy-font {
39
+ // Begin adjustments for font baseline offset
40
+ // These should be removed when legacy font support is dropped
41
+ $offset: govuk-em(1px, $font-size);
42
+ top: $offset * -1;
43
+ bottom: $offset;
44
+ } @else {
45
+ top: 0;
46
+ bottom: 0;
47
+ }
48
+
49
+ left: govuk-em(3px, $font-size);
50
+
51
+ width: $chevron-size;
52
+ height: $chevron-size;
53
+
54
+ margin: auto 0;
55
+
56
+ -webkit-transform: rotate(225deg);
57
+
58
+ -ms-transform: rotate(225deg);
59
+
60
+ transform: rotate(225deg);
61
+
62
+ border: solid;
63
+ border-width: $chevron-border-min-width $chevron-border-min-width 0 0;
64
+ border-color: $chevron-border-colour;
65
+
66
+ @supports (border-width: unquote("max(0px)")) {
67
+ border-width: unquote("max(#{$chevron-border-min-width}, #{$chevron-border-width}) max(#{$chevron-border-min-width}, #{$chevron-border-width})") 0 0;
68
+
69
+ // Ensure that the chevron never gets smaller than 16px
70
+ font-size: unquote("max(#{$font-size * 1px}, 1em)");
71
+ }
72
+
73
+ // Fall back to a less than sign for IE8
74
+ @include _govuk-if-ie8 {
75
+ content: "\003c"; // Less than sign (<)
76
+ width: auto;
77
+ height: auto;
78
+ border: 0;
79
+ color: $chevron-border-colour;
80
+
81
+ // IE8 doesn't seem to like rendering pseudo-elements using @font-faces,
82
+ // so fall back to using another sans-serif font to render the chevron.
83
+ font-family: Arial, sans-serif;
84
+ }
85
+ }
86
+
87
+ .govuk-back-link:focus:before {
88
+ border-color: $govuk-focus-text-colour;
89
+ }
90
+
91
+ .govuk-back-link:after {
92
+ content: "";
93
+ position: absolute;
94
+ top: -14px;
95
+ right: 0;
96
+ bottom: -14px;
97
+ left: 0;
98
+ }
99
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,147 @@
1
+ @include govuk-exports("govuk/component/breadcrumbs") {
2
+ // Component font-size on the Frontend (used for calculations)
3
+ $font-size: 16;
4
+
5
+ // Size of chevron (excluding border)
6
+ $chevron-size: govuk-em(7px, $font-size);
7
+
8
+ // Size of chevron border
9
+ $chevron-border-min-width: 1px;
10
+ $chevron-border-width: govuk-em($chevron-border-min-width, $font-size);
11
+
12
+ // Colour of chevron
13
+ $chevron-border-colour: $govuk-secondary-text-colour;
14
+
15
+ // Calculated altitude (△↕) of the right-angled isosceles chevron with sides
16
+ // of length 8 (7px + 1px border):
17
+ //
18
+ // √(8² + 8²) * 0.5 ≅ 5.655
19
+ $chevron-altitude-calculated: govuk-em(5.655px, $font-size);
20
+
21
+ .govuk-breadcrumbs {
22
+ @include govuk-font($size: $font-size);
23
+ @include govuk-text-colour;
24
+
25
+ margin-top: govuk-spacing(3);
26
+ margin-bottom: govuk-spacing(2);
27
+ }
28
+
29
+ .govuk-breadcrumbs__list {
30
+ @include govuk-clearfix;
31
+
32
+ margin: 0;
33
+ padding: 0;
34
+ list-style-type: none;
35
+ }
36
+
37
+ .govuk-breadcrumbs__list-item {
38
+
39
+ display: inline-block;
40
+ position: relative;
41
+
42
+ margin-bottom: govuk-spacing(1);
43
+
44
+ // Add both margin and padding such that the chevron appears centrally
45
+ // between each breadcrumb item
46
+ margin-left: govuk-em(govuk-spacing(2), $font-size);
47
+ padding-left: govuk-em(govuk-spacing(2), $font-size) + $chevron-altitude-calculated;
48
+
49
+ float: left;
50
+
51
+ // Create a chevron using a box with borders on two sides, rotated 45deg.
52
+ &:before {
53
+ content: "";
54
+ display: block;
55
+
56
+ position: absolute;
57
+
58
+ @if $govuk-use-legacy-font {
59
+ // Begin adjustments for font baseline offset
60
+ // These should be removed when legacy font support is dropped
61
+ $offset: govuk-em(1px, $font-size);
62
+ top: $offset * -1;
63
+ bottom: $offset;
64
+ } @else {
65
+ top: 0;
66
+ bottom: 0;
67
+ }
68
+
69
+ // Offset by the difference between the width of the non-rotated square
70
+ // and its width when rotated
71
+ left: (($chevron-altitude-calculated * -2) + $chevron-size + $chevron-border-width);
72
+
73
+ width: $chevron-size;
74
+ height: $chevron-size;
75
+
76
+ margin: auto 0;
77
+
78
+ -webkit-transform: rotate(45deg);
79
+
80
+ -ms-transform: rotate(45deg);
81
+
82
+ transform: rotate(45deg);
83
+
84
+ border: solid;
85
+ border-width: $chevron-border-min-width $chevron-border-min-width 0 0;
86
+ border-color: $chevron-border-colour;
87
+
88
+ @supports (border-width: unquote("max(0px)")) {
89
+ border-width: unquote("max(#{$chevron-border-min-width}, #{$chevron-border-width}) max(#{$chevron-border-min-width}, #{$chevron-border-width})") 0 0;
90
+
91
+ // Ensure that the chevron never gets smaller than 16px
92
+ font-size: unquote("max(#{$font-size * 1px}, 1em)");
93
+ }
94
+
95
+ // Fall back to a greater than sign for IE8
96
+ @include _govuk-if-ie8 {
97
+ content: "\003e"; // Greater than sign (>)
98
+ width: auto;
99
+ height: auto;
100
+ border: 0;
101
+ color: $chevron-border-colour;
102
+
103
+ // IE8 doesn't seem to like rendering pseudo-elements using @font-faces,
104
+ // so fall back to using another sans-serif font to render the chevron.
105
+ font-family: Arial, sans-serif;
106
+ }
107
+ }
108
+
109
+ &:first-child {
110
+ margin-left: 0;
111
+ padding-left: 0;
112
+
113
+ &:before {
114
+ content: none;
115
+ display: none;
116
+ }
117
+ }
118
+ }
119
+
120
+ .govuk-breadcrumbs__link {
121
+ @include govuk-link-common;
122
+ @include govuk-link-style-text;
123
+ }
124
+
125
+ .govuk-breadcrumbs--collapse-on-mobile {
126
+ @include govuk-media-query($until: tablet) {
127
+ .govuk-breadcrumbs__list-item {
128
+ display: none;
129
+
130
+ &:first-child,
131
+ &:last-child {
132
+ display: inline-block;
133
+ }
134
+
135
+ &:before {
136
+ top: govuk-em(6px, $font-size);
137
+ margin: 0;
138
+ }
139
+ }
140
+
141
+ .govuk-breadcrumbs__list {
142
+ display: -ms-flexbox;
143
+ display: flex;
144
+ }
145
+ }
146
+ }
147
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";