govuk_publishing_components 21.52.0 → 21.55.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/action-link--nhs.png +0 -0
  3. data/app/assets/images/govuk_publishing_components/action-link--nhs.svg +1 -0
  4. data/app/assets/images/govuk_publishing_components/action-link-arrow--dark.png +0 -0
  5. data/app/assets/images/govuk_publishing_components/action-link-arrow--simple.png +0 -0
  6. data/app/assets/images/govuk_publishing_components/action-link-arrow.png +0 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +38 -7
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +0 -38
  9. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss +1 -1
  10. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +34 -22
  11. data/app/views/govuk_publishing_components/components/_action_link.html.erb +23 -3
  12. data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +5 -36
  13. data/app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb +28 -8
  14. data/app/views/govuk_publishing_components/components/docs/action_link.yml +43 -15
  15. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +23 -0
  16. data/lib/govuk_publishing_components.rb +1 -0
  17. data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +107 -0
  18. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +14 -1
  19. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +1 -3
  20. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +40 -19
  21. data/lib/govuk_publishing_components/presenters/machine_readable/faq_page_schema.rb +7 -6
  22. data/lib/govuk_publishing_components/presenters/machine_readable/html_publication_schema.rb +77 -0
  23. data/lib/govuk_publishing_components/presenters/schema_org.rb +24 -16
  24. data/lib/govuk_publishing_components/version.rb +1 -1
  25. data/node_modules/axe-core/CHANGELOG.md +6 -0
  26. data/node_modules/axe-core/axe.js +19 -3
  27. data/node_modules/axe-core/axe.min.js +2 -2
  28. data/node_modules/axe-core/bower.json +1 -1
  29. data/node_modules/axe-core/lib/commons/dom/get-element-stack.js +27 -1
  30. data/node_modules/axe-core/package.json +21 -21
  31. data/node_modules/axe-core/sri-history.json +4 -0
  32. data/node_modules/govuk-frontend/README.md +6 -6
  33. data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
  34. data/node_modules/govuk-frontend/govuk/all.js +1 -1
  35. data/node_modules/govuk-frontend/govuk/all.scss +1 -3
  36. data/node_modules/govuk-frontend/govuk/components/_all.scss +31 -29
  37. data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
  38. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +207 -0
  39. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
  40. data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
  41. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +112 -0
  42. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
  43. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
  44. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +6 -0
  45. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +12 -1
  46. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
  47. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +280 -0
  48. data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
  49. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +28 -0
  50. data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
  51. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +304 -0
  52. data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
  53. data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  54. data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
  55. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +84 -0
  56. data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
  57. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
  58. data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
  59. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +55 -0
  60. data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
  61. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  62. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
  63. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +77 -0
  64. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
  65. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +238 -0
  66. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
  67. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +312 -0
  68. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +7 -1
  69. data/node_modules/govuk-frontend/govuk/components/header/template.njk +2 -2
  70. data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
  71. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +46 -0
  72. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +99 -0
  73. data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
  74. data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  75. data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
  76. data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
  77. data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
  78. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +40 -0
  79. data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
  80. data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  81. data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
  82. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
  83. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
  84. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +53 -0
  85. data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
  86. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +33 -0
  87. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
  88. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +153 -0
  89. data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
  90. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +50 -0
  91. data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
  92. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +138 -0
  93. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
  94. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +87 -0
  95. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
  96. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +51 -0
  97. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
  98. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +56 -0
  99. data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
  100. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
  101. data/node_modules/govuk-frontend/govuk/core/_links.scss +5 -3
  102. data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
  103. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
  104. data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -3
  105. data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
  106. data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
  107. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  108. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
  109. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +1 -1
  110. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +1 -1
  111. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  112. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +1 -1
  113. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +1 -1
  114. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
  115. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -3
  116. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +1 -3
  117. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -3
  118. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +2 -4
  119. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +5 -3
  120. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
  121. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
  122. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +5 -3
  123. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
  124. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
  125. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -1
  126. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
  127. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -1
  128. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
  129. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  130. data/node_modules/govuk-frontend/package.json +21 -21
  131. metadata +50 -2
@@ -0,0 +1,77 @@
1
+ @import "../error-message/index";
2
+ @import "../hint/index";
3
+ @import "../label/index";
4
+
5
+ @include govuk-exports("govuk/component/file-upload") {
6
+ $component-padding: govuk-spacing(1);
7
+
8
+ .govuk-file-upload {
9
+ @include govuk-font($size: 19);
10
+ @include govuk-text-colour;
11
+ padding-top: $component-padding;
12
+ padding-bottom: $component-padding;
13
+
14
+ &:focus {
15
+ // "Yank" the padding with negative margin to avoid a jump
16
+ // when element is focused
17
+ margin-right: -$component-padding;
18
+ margin-left: -$component-padding;
19
+ padding-right: $component-padding;
20
+ padding-left: $component-padding;
21
+
22
+ outline: $govuk-focus-width solid $govuk-focus-colour;
23
+ // Use `box-shadow` to add border instead of changing `border-width`
24
+ // (which changes element size) and since `outline` is already used for the
25
+ // yellow focus state.
26
+ box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
27
+
28
+ @include govuk-if-ie8 {
29
+ // IE8 doesn't support `box-shadow` so add an actual border
30
+ border: 4px solid $govuk-input-border-colour;
31
+ }
32
+ }
33
+
34
+ // Set "focus-within" to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1430196
35
+ // so that component receives focus in Firefox.
36
+ // This can't be set together with `:focus` as all versions of IE fail
37
+ // to recognise `focus-within` and don't set any styles from the block
38
+ // when it's a selector.
39
+ &:focus-within {
40
+ margin-right: -$component-padding;
41
+ margin-left: -$component-padding;
42
+ padding-right: $component-padding;
43
+ padding-left: $component-padding;
44
+
45
+ outline: $govuk-focus-width solid $govuk-focus-colour;
46
+
47
+ box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
48
+ }
49
+ }
50
+
51
+ .govuk-file-upload--error {
52
+ // As `upload--error` has border, it needs to have the same padding as
53
+ // the standard focused element.
54
+ margin-right: -$component-padding;
55
+ margin-left: -$component-padding;
56
+ padding-right: $component-padding;
57
+ padding-left: $component-padding;
58
+ border: $govuk-border-width-form-element-error solid $govuk-error-colour;
59
+
60
+ &:focus {
61
+ border-color: $govuk-input-border-colour;
62
+ // Remove `box-shadow` inherited from `:focus` as `file-upload--error`
63
+ // already has the thicker border.
64
+ box-shadow: none;
65
+ }
66
+
67
+ // Repeat `:focus` styles to prevent error styles from being applied when
68
+ // input button is pressed as this moves the focus to "within".
69
+ // This can't be set together with `:focus` as all versions of IE fail
70
+ // to recognise `focus-within` and don't set any styles from the block
71
+ // when it's a selector.
72
+ &:focus-within {
73
+ border-color: $govuk-input-border-colour;
74
+ box-shadow: none;
75
+ }
76
+ }
77
+ }
@@ -1,244 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @import "../../helpers/typography";
6
-
7
- @include govuk-exports("govuk/component/footer") {
8
-
9
- $govuk-footer-background: $govuk-canvas-background-colour;
10
- $govuk-footer-border: $govuk-border-colour;
11
- // This variable can be removed entirely once the legacy palette goes away,
12
- // as it'll just be the same as $govuk-footer-border.
13
- $govuk-footer-border-top: $govuk-border-colour;
14
- $govuk-footer-text: $govuk-text-colour;
15
- $govuk-footer-link: $govuk-footer-text;
16
- $govuk-footer-link-hover: false;
17
-
18
- @if ($govuk-use-legacy-palette) {
19
- // sass-lint:disable no-color-literals
20
- $govuk-footer-border-top: #a1acb2;
21
- $govuk-footer-border: govuk-colour("grey-2");
22
- $govuk-footer-text: #454a4c;
23
- $govuk-footer-link: $govuk-footer-text;
24
-
25
- // Only used with the legacy palette
26
- $govuk-footer-link-hover: #171819;
27
- }
28
-
29
- // Based on the govuk-crest-2x.png image dimensions.
30
- $govuk-footer-crest-image-width-2x: 250px;
31
- $govuk-footer-crest-image-height-2x: 204px;
32
- // Half the 2x image so that it fits the regular 1x size.
33
- $govuk-footer-crest-image-width: ($govuk-footer-crest-image-width-2x / 2);
34
- $govuk-footer-crest-image-height: ($govuk-footer-crest-image-height-2x / 2);
35
-
36
- .govuk-footer {
37
- @include govuk-font($size: 16);
38
- @include govuk-responsive-padding(7, "top");
39
- @include govuk-responsive-padding(5, "bottom");
40
-
41
- border-top: 1px solid $govuk-footer-border-top;
42
- color: $govuk-footer-text;
43
- background: $govuk-footer-background;
44
- }
45
-
46
- .govuk-footer__link {
47
- @if ($govuk-use-legacy-palette) {
48
- &:link,
49
- &:visited {
50
- color: $govuk-footer-link;
51
- }
52
-
53
- &:hover,
54
- &:active {
55
- color: $govuk-footer-link-hover;
56
- }
57
- } @else {
58
- &:link,
59
- &:visited,
60
- &:hover,
61
- &:active {
62
- color: $govuk-footer-link;
63
- }
64
- }
65
-
66
- &:focus {
67
- @include govuk-focused-text;
68
- }
69
-
70
- // alphagov/govuk_template includes a specific a:link:focus selector
71
- // designed to make unvisited links a slightly darker blue when focussed, so
72
- // we need to override the text colour for that combination of selectors.
73
- @include govuk-compatibility(govuk_template) {
74
- &:link:focus {
75
- @include govuk-text-colour;
76
- }
77
- }
78
- }
79
-
80
- .govuk-footer__section-break {
81
- margin: 0; // Reset `<hr>` default margins
82
- @include govuk-responsive-margin(8, "bottom");
83
- border: 0; // Reset `<hr>` default borders
84
- border-bottom: 1px solid $govuk-footer-border;
85
- }
86
-
87
- .govuk-footer__meta {
88
- display: -webkit-box;
89
- display: -ms-flexbox;
90
- display: flex; // Support: Flexbox
91
- margin-right: -$govuk-gutter-half;
92
- margin-left: -$govuk-gutter-half;
93
- -ms-flex-wrap: wrap;
94
- flex-wrap: wrap; // Support: Flexbox
95
- -webkit-box-align: end;
96
- -ms-flex-align: end;
97
- align-items: flex-end; // Support: Flexbox
98
- -webkit-box-pack: center;
99
- -ms-flex-pack: center;
100
- justify-content: center; // Support: Flexbox
101
- }
102
-
103
- .govuk-footer__meta-item {
104
- margin-right: $govuk-gutter-half;
105
- margin-bottom: govuk-spacing(5);
106
- margin-left: $govuk-gutter-half;
107
- }
108
-
109
- .govuk-footer__meta-item--grow {
110
- -webkit-box-flex: 1;
111
- -ms-flex: 1;
112
- flex: 1; // Support: Flexbox
113
- @include govuk-media-query ($until: tablet) {
114
- -ms-flex-preferred-size: 320px;
115
- flex-basis: 320px; // Support: Flexbox
116
- }
117
- }
118
-
119
- .govuk-footer__licence-logo {
120
- display: inline-block;
121
- margin-right: govuk-spacing(2);
122
- @include govuk-media-query ($until: desktop) {
123
- margin-bottom: govuk-spacing(3);
124
- }
125
- vertical-align: top;
126
- }
127
-
128
- .govuk-footer__licence-description {
129
- display: inline-block;
130
- }
131
-
132
- .govuk-footer__copyright-logo {
133
- display: inline-block;
134
- min-width: $govuk-footer-crest-image-width;
135
- padding-top: ($govuk-footer-crest-image-height + govuk-spacing(2));
136
- background-image: govuk-image-url("govuk-crest.png");
137
- @include govuk-device-pixel-ratio {
138
- background-image: govuk-image-url("govuk-crest-2x.png");
139
- }
140
- background-repeat: no-repeat;
141
- background-position: 50% 0%;
142
- background-size: $govuk-footer-crest-image-width $govuk-footer-crest-image-height;
143
- text-align: center;
144
- text-decoration: none;
145
- white-space: nowrap;
146
- }
147
-
148
- .govuk-footer__inline-list {
149
- margin-top: 0;
150
- margin-bottom: govuk-spacing(3);
151
- padding: 0;
152
- }
153
-
154
- .govuk-footer__meta-custom {
155
- margin-bottom: govuk-spacing(4);
156
- }
157
-
158
- .govuk-footer__inline-list-item {
159
- display: inline-block;
160
- margin-right: govuk-spacing(3);
161
- margin-bottom: govuk-spacing(1);
162
- }
163
-
164
- .govuk-footer__heading {
165
- @include govuk-responsive-margin(7, "bottom");
166
- padding-bottom: govuk-spacing(4);
167
- @include govuk-media-query ($until: tablet) {
168
- padding-bottom: govuk-spacing(2);
169
- }
170
- border-bottom: 1px solid $govuk-footer-border;
171
- }
172
-
173
- .govuk-footer__navigation {
174
- display: -webkit-box;
175
- display: -ms-flexbox;
176
- display: flex; // Support: Flexbox
177
- margin-right: -$govuk-gutter-half;
178
- margin-left: -$govuk-gutter-half;
179
- -ms-flex-wrap: wrap;
180
- flex-wrap: wrap; // Support: Flexbox
181
- }
182
-
183
- .govuk-footer__section {
184
- display: inline-block;
185
- margin-right: $govuk-gutter-half;
186
- margin-bottom: $govuk-gutter;
187
- margin-left: $govuk-gutter-half;
188
- vertical-align: top;
189
- // Ensure columns take up equal width (typically one-half:one-half)
190
- -webkit-box-flex: 1;
191
- -ms-flex-positive: 1;
192
- flex-grow: 1; // Support: Flexbox
193
- -ms-flex-negative: 1;
194
- flex-shrink: 1; // Support: Flexbox
195
- @include govuk-media-query ($until: desktop) {
196
- // Make sure columns do not drop below 200px in width
197
- // Will typically result in wrapping, and end up in a single column on smaller screens.
198
- -ms-flex-preferred-size: 200px;
199
- flex-basis: 200px; // Support: Flexbox
200
- }
201
- }
202
-
203
- // If there are only two sections, set the layout to be two-third:one-third on desktop
204
- @include govuk-media-query ($from: desktop) {
205
- // We match the first section with `:first-child`.
206
- // To ensure the section is one of two, we can count backwards using `:nth-last-child(2)`.
207
- .govuk-footer__section:first-child:nth-last-child(2) {
208
- -webkit-box-flex: 2;
209
- -ms-flex-positive: 2;
210
- flex-grow: 2; // Support: Flexbox
211
- }
212
- }
213
-
214
- .govuk-footer__list {
215
- margin: 0;
216
- padding: 0;
217
- list-style: none;
218
- -webkit-column-gap: $govuk-gutter;
219
- -moz-column-gap: $govuk-gutter;
220
- column-gap: $govuk-gutter; // Support: Columns
221
- }
222
-
223
- @include govuk-media-query ($from: desktop) {
224
- .govuk-footer__list--columns-2 {
225
- -webkit-column-count: 2;
226
- -moz-column-count: 2;
227
- column-count: 2; // Support: Columns
228
- }
229
-
230
- .govuk-footer__list--columns-3 {
231
- -webkit-column-count: 3;
232
- -moz-column-count: 3;
233
- column-count: 3; // Support: Columns
234
- }
235
- }
236
-
237
- .govuk-footer__list-item {
238
- @include govuk-responsive-margin(4, "bottom");
239
- }
240
-
241
- .govuk-footer__list-item:last-child {
242
- margin-bottom: 0;
243
- }
244
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,238 @@
1
+ @include govuk-exports("govuk/component/footer") {
2
+
3
+ $govuk-footer-background: $govuk-canvas-background-colour;
4
+ $govuk-footer-border: $govuk-border-colour;
5
+ // This variable can be removed entirely once the legacy palette goes away,
6
+ // as it'll just be the same as $govuk-footer-border.
7
+ $govuk-footer-border-top: $govuk-border-colour;
8
+ $govuk-footer-text: $govuk-text-colour;
9
+ $govuk-footer-link: $govuk-footer-text;
10
+ $govuk-footer-link-hover: false;
11
+
12
+ @if ($govuk-use-legacy-palette) {
13
+ // sass-lint:disable no-color-literals
14
+ $govuk-footer-border-top: #a1acb2;
15
+ $govuk-footer-border: govuk-colour("grey-2");
16
+ $govuk-footer-text: #454a4c;
17
+ $govuk-footer-link: $govuk-footer-text;
18
+
19
+ // Only used with the legacy palette
20
+ $govuk-footer-link-hover: #171819;
21
+ }
22
+
23
+ // Based on the govuk-crest-2x.png image dimensions.
24
+ $govuk-footer-crest-image-width-2x: 250px;
25
+ $govuk-footer-crest-image-height-2x: 204px;
26
+ // Half the 2x image so that it fits the regular 1x size.
27
+ $govuk-footer-crest-image-width: ($govuk-footer-crest-image-width-2x / 2);
28
+ $govuk-footer-crest-image-height: ($govuk-footer-crest-image-height-2x / 2);
29
+
30
+ .govuk-footer {
31
+ @include govuk-font($size: 16);
32
+ @include govuk-responsive-padding(7, "top");
33
+ @include govuk-responsive-padding(5, "bottom");
34
+
35
+ border-top: 1px solid $govuk-footer-border-top;
36
+ color: $govuk-footer-text;
37
+ background: $govuk-footer-background;
38
+ }
39
+
40
+ .govuk-footer__link {
41
+ @if ($govuk-use-legacy-palette) {
42
+ &:link,
43
+ &:visited {
44
+ color: $govuk-footer-link;
45
+ }
46
+
47
+ &:hover,
48
+ &:active {
49
+ color: $govuk-footer-link-hover;
50
+ }
51
+ } @else {
52
+ &:link,
53
+ &:visited,
54
+ &:hover,
55
+ &:active {
56
+ color: $govuk-footer-link;
57
+ }
58
+ }
59
+
60
+ &:focus {
61
+ @include govuk-focused-text;
62
+ }
63
+
64
+ // alphagov/govuk_template includes a specific a:link:focus selector
65
+ // designed to make unvisited links a slightly darker blue when focussed, so
66
+ // we need to override the text colour for that combination of selectors.
67
+ @include govuk-compatibility(govuk_template) {
68
+ &:link:focus {
69
+ @include govuk-text-colour;
70
+ }
71
+ }
72
+ }
73
+
74
+ .govuk-footer__section-break {
75
+ margin: 0; // Reset `<hr>` default margins
76
+ @include govuk-responsive-margin(8, "bottom");
77
+ border: 0; // Reset `<hr>` default borders
78
+ border-bottom: 1px solid $govuk-footer-border;
79
+ }
80
+
81
+ .govuk-footer__meta {
82
+ display: -webkit-box;
83
+ display: -ms-flexbox;
84
+ display: flex; // Support: Flexbox
85
+ margin-right: -$govuk-gutter-half;
86
+ margin-left: -$govuk-gutter-half;
87
+ -ms-flex-wrap: wrap;
88
+ flex-wrap: wrap; // Support: Flexbox
89
+ -webkit-box-align: end;
90
+ -ms-flex-align: end;
91
+ align-items: flex-end; // Support: Flexbox
92
+ -webkit-box-pack: center;
93
+ -ms-flex-pack: center;
94
+ justify-content: center; // Support: Flexbox
95
+ }
96
+
97
+ .govuk-footer__meta-item {
98
+ margin-right: $govuk-gutter-half;
99
+ margin-bottom: govuk-spacing(5);
100
+ margin-left: $govuk-gutter-half;
101
+ }
102
+
103
+ .govuk-footer__meta-item--grow {
104
+ -webkit-box-flex: 1;
105
+ -ms-flex: 1;
106
+ flex: 1; // Support: Flexbox
107
+ @include govuk-media-query ($until: tablet) {
108
+ -ms-flex-preferred-size: 320px;
109
+ flex-basis: 320px; // Support: Flexbox
110
+ }
111
+ }
112
+
113
+ .govuk-footer__licence-logo {
114
+ display: inline-block;
115
+ margin-right: govuk-spacing(2);
116
+ @include govuk-media-query ($until: desktop) {
117
+ margin-bottom: govuk-spacing(3);
118
+ }
119
+ vertical-align: top;
120
+ }
121
+
122
+ .govuk-footer__licence-description {
123
+ display: inline-block;
124
+ }
125
+
126
+ .govuk-footer__copyright-logo {
127
+ display: inline-block;
128
+ min-width: $govuk-footer-crest-image-width;
129
+ padding-top: ($govuk-footer-crest-image-height + govuk-spacing(2));
130
+ background-image: govuk-image-url("govuk-crest.png");
131
+ @include govuk-device-pixel-ratio {
132
+ background-image: govuk-image-url("govuk-crest-2x.png");
133
+ }
134
+ background-repeat: no-repeat;
135
+ background-position: 50% 0%;
136
+ background-size: $govuk-footer-crest-image-width $govuk-footer-crest-image-height;
137
+ text-align: center;
138
+ text-decoration: none;
139
+ white-space: nowrap;
140
+ }
141
+
142
+ .govuk-footer__inline-list {
143
+ margin-top: 0;
144
+ margin-bottom: govuk-spacing(3);
145
+ padding: 0;
146
+ }
147
+
148
+ .govuk-footer__meta-custom {
149
+ margin-bottom: govuk-spacing(4);
150
+ }
151
+
152
+ .govuk-footer__inline-list-item {
153
+ display: inline-block;
154
+ margin-right: govuk-spacing(3);
155
+ margin-bottom: govuk-spacing(1);
156
+ }
157
+
158
+ .govuk-footer__heading {
159
+ @include govuk-responsive-margin(7, "bottom");
160
+ padding-bottom: govuk-spacing(4);
161
+ @include govuk-media-query ($until: tablet) {
162
+ padding-bottom: govuk-spacing(2);
163
+ }
164
+ border-bottom: 1px solid $govuk-footer-border;
165
+ }
166
+
167
+ .govuk-footer__navigation {
168
+ display: -webkit-box;
169
+ display: -ms-flexbox;
170
+ display: flex; // Support: Flexbox
171
+ margin-right: -$govuk-gutter-half;
172
+ margin-left: -$govuk-gutter-half;
173
+ -ms-flex-wrap: wrap;
174
+ flex-wrap: wrap; // Support: Flexbox
175
+ }
176
+
177
+ .govuk-footer__section {
178
+ display: inline-block;
179
+ margin-right: $govuk-gutter-half;
180
+ margin-bottom: $govuk-gutter;
181
+ margin-left: $govuk-gutter-half;
182
+ vertical-align: top;
183
+ // Ensure columns take up equal width (typically one-half:one-half)
184
+ -webkit-box-flex: 1;
185
+ -ms-flex-positive: 1;
186
+ flex-grow: 1; // Support: Flexbox
187
+ -ms-flex-negative: 1;
188
+ flex-shrink: 1; // Support: Flexbox
189
+ @include govuk-media-query ($until: desktop) {
190
+ // Make sure columns do not drop below 200px in width
191
+ // Will typically result in wrapping, and end up in a single column on smaller screens.
192
+ -ms-flex-preferred-size: 200px;
193
+ flex-basis: 200px; // Support: Flexbox
194
+ }
195
+ }
196
+
197
+ // If there are only two sections, set the layout to be two-third:one-third on desktop
198
+ @include govuk-media-query ($from: desktop) {
199
+ // We match the first section with `:first-child`.
200
+ // To ensure the section is one of two, we can count backwards using `:nth-last-child(2)`.
201
+ .govuk-footer__section:first-child:nth-last-child(2) {
202
+ -webkit-box-flex: 2;
203
+ -ms-flex-positive: 2;
204
+ flex-grow: 2; // Support: Flexbox
205
+ }
206
+ }
207
+
208
+ .govuk-footer__list {
209
+ margin: 0;
210
+ padding: 0;
211
+ list-style: none;
212
+ -webkit-column-gap: $govuk-gutter;
213
+ -moz-column-gap: $govuk-gutter;
214
+ column-gap: $govuk-gutter; // Support: Columns
215
+ }
216
+
217
+ @include govuk-media-query ($from: desktop) {
218
+ .govuk-footer__list--columns-2 {
219
+ -webkit-column-count: 2;
220
+ -moz-column-count: 2;
221
+ column-count: 2; // Support: Columns
222
+ }
223
+
224
+ .govuk-footer__list--columns-3 {
225
+ -webkit-column-count: 3;
226
+ -moz-column-count: 3;
227
+ column-count: 3; // Support: Columns
228
+ }
229
+ }
230
+
231
+ .govuk-footer__list-item {
232
+ @include govuk-responsive-margin(4, "bottom");
233
+ }
234
+
235
+ .govuk-footer__list-item:last-child {
236
+ margin-bottom: 0;
237
+ }
238
+ }