govuk_tech_docs 6.3.0 → 6.4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +15 -14
  3. data/.github/workflows/build-middleman-artifact.yaml +3 -3
  4. data/.github/workflows/check-documentation-updates.yaml +32 -0
  5. data/.github/workflows/check-gem-version.yaml +36 -0
  6. data/.github/workflows/npm-vulnerability-scanner.yaml +55 -0
  7. data/.github/workflows/pipeline.yaml +56 -0
  8. data/.github/workflows/publish-gem.yaml +70 -0
  9. data/.github/workflows/{deploy-to-pages.yaml → publish-github-pages.yaml} +4 -5
  10. data/.github/workflows/ruby-vulnerability-scanner.yaml +44 -0
  11. data/.github/workflows/test.yaml +9 -7
  12. data/.rspec +1 -0
  13. data/CHANGELOG.md +14 -0
  14. data/README.md +4 -1
  15. data/documentation/config/tech-docs.yml +1 -1
  16. data/documentation/source/configure_project/global_configuration/index.html.md.erb +9 -1
  17. data/lib/govuk_tech_docs/contribution_banner.rb +15 -3
  18. data/lib/govuk_tech_docs/version.rb +1 -1
  19. data/lib/source/layouts/_footer.erb +1 -1
  20. data/lib/source/layouts/_header.erb +1 -1
  21. data/lib/source/layouts/_service_navigation.erb +3 -1
  22. data/lib/source/layouts/core.erb +2 -4
  23. data/lib/tasks/lint.rake +87 -13
  24. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +2 -5
  25. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +2 -5
  26. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  27. data/node_modules/govuk-frontend/dist/govuk/components/_index.import.scss +3 -0
  28. data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +3 -0
  29. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_mixin.scss +1 -5
  30. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_mixin.scss +7 -1
  31. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_mixin.scss +6 -0
  32. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_mixin.scss +5 -1
  33. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_feedback.import.scss +6 -0
  34. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.import.scss +8 -0
  35. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.scss +5 -0
  36. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_mixin.scss +48 -0
  37. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +1 -4
  38. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +1 -4
  39. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +1 -5
  40. data/node_modules/govuk-frontend/dist/govuk/components/footer/_mixin.scss +6 -0
  41. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_generic-header.import.scss +6 -0
  42. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_index.import.scss +8 -0
  43. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_index.scss +5 -0
  44. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_mixin.scss +140 -0
  45. data/node_modules/govuk-frontend/dist/govuk/components/header/_mixin.scss +9 -65
  46. data/node_modules/govuk-frontend/dist/govuk/components/input/_mixin.scss +1 -0
  47. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.import.scss +8 -0
  48. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.scss +6 -0
  49. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_language-navigation.import.scss +6 -0
  50. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_mixin.scss +68 -0
  51. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_mixin.scss +8 -7
  52. data/node_modules/govuk-frontend/dist/govuk/components/panel/_mixin.scss +46 -12
  53. data/node_modules/govuk-frontend/dist/govuk/components/radios/_mixin.scss +7 -1
  54. data/node_modules/govuk-frontend/dist/govuk/components/select/_mixin.scss +0 -7
  55. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +55 -9
  56. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +1 -1
  57. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.mixin.scss +1 -0
  58. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  59. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +1 -1
  60. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +3 -0
  61. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +16 -2
  62. data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss +1 -1
  63. data/package-lock.json +183 -582
  64. data/package.json +3 -3
  65. metadata +20 -4
  66. data/.github/workflows/dependency-review.yaml +0 -25
  67. data/.github/workflows/publish.yaml +0 -83
@@ -1,45 +1,29 @@
1
1
  @use "../../base";
2
+ @use "../generic-header/mixin" as genericHeader;
2
3
 
3
4
  /// @access private
4
5
  @mixin styles {
5
6
  $logo-bottom-margin: 2px;
6
7
 
7
8
  .govuk-header {
8
- @include base.govuk-font($size: 16, $line-height: 1);
9
-
10
- // Add a transparent bottom border for forced-colour modes
11
- border-bottom: 1px solid transparent;
12
- color: base.govuk-colour("white");
13
- background: base.govuk-functional-colour(brand);
9
+ @include genericHeader.block-styles(
10
+ $background-colour: base.govuk-functional-colour("brand"),
11
+ $text-colour: base.govuk-functional-colour("inverse-text")
12
+ );
14
13
  }
15
14
 
16
15
  .govuk-header__container--full-width {
17
- padding: 0 base.govuk-spacing(3);
16
+ @include genericHeader.full-width-container-styles;
18
17
  }
19
18
 
20
19
  .govuk-header__logo {
21
- box-sizing: border-box;
22
-
23
20
  // Magic numbers, set padding to vertically centre align the logo
24
- padding-top: 16px;
25
- padding-bottom: 14px - $logo-bottom-margin;
21
+ @include genericHeader.logo-styles($padding-top: 16px, $padding-bottom: 14px - $logo-bottom-margin);
26
22
  }
27
23
 
28
24
  .govuk-header__homepage-link {
29
- // Avoid using the `base.govuk-link-common` mixin because the links in the
30
- // header get a special treatment, because:
31
- //
32
- // - underlines are only visible on hover
33
- // - all links get a 3px underline regardless of text size, as there are
34
- // multiple grouped elements close to one another and having slightly
35
- // different underline widths looks unbalanced
36
- //
37
- // Font size needs to be set on the link so that the box sizing is correct
38
- // in Firefox
39
- display: inline;
40
- margin-right: base.govuk-spacing(2);
41
- font-size: 30px; // We don't have a mixin that produces 30px font size
42
- text-decoration: none;
25
+ @include genericHeader.link-styles;
26
+
43
27
  // Remove word-spacing from within the logo so we can ignore
44
28
  // whitespace characters in the HTML
45
29
  word-spacing: base.govuk-px-to-rem(-6px);
@@ -47,28 +31,6 @@
47
31
  > * {
48
32
  word-spacing: 0;
49
33
  }
50
- @include base.govuk-link-style-inverse;
51
-
52
- &:link,
53
- &:visited {
54
- text-decoration: none;
55
- }
56
-
57
- &:hover,
58
- &:active {
59
- // Negate the added border
60
- $link-underline-thickness: 3px;
61
- margin-bottom: $link-underline-thickness * -1;
62
- border-bottom: $link-underline-thickness solid;
63
- }
64
-
65
- &:focus {
66
- // Remove any borders that show when focused and hovered.
67
- margin-bottom: 0;
68
- border-bottom: 0;
69
-
70
- @include base.govuk-focused-text;
71
- }
72
34
  }
73
35
 
74
36
  .govuk-header__logotype {
@@ -146,24 +108,6 @@
146
108
  }
147
109
 
148
110
  @media print {
149
- .govuk-header {
150
- border-bottom-width: 0;
151
- color: base.govuk-colour("black");
152
- background: transparent;
153
- }
154
-
155
- .govuk-header__homepage-link {
156
- &:link,
157
- &:visited {
158
- color: base.govuk-colour("black");
159
- }
160
-
161
- // Do not append link href to GOV.UK link when printing (e.g. '(/)')
162
- &::after {
163
- display: none;
164
- }
165
- }
166
-
167
111
  .govuk-header__product-name {
168
112
  // Fix product name alignment in Firefox when printing
169
113
  @-moz-document url-prefix() {
@@ -125,6 +125,7 @@
125
125
  padding: base.govuk-spacing(1);
126
126
  border: base.$govuk-border-width-form-element solid;
127
127
  border-color: base.govuk-functional-colour(input-border);
128
+ color: base.govuk-functional-colour(text);
128
129
  background-color: base.govuk-colour("black", $variant: "tint-95");
129
130
  text-align: center;
130
131
  white-space: nowrap;
@@ -0,0 +1,8 @@
1
+ @use "mixin";
2
+
3
+ @import "../../base";
4
+
5
+ @include govuk-exports("govuk/component/language-navigation") {
6
+ @include mixin.styles;
7
+ }
8
+
@@ -0,0 +1,6 @@
1
+ @use "../../custom-properties";
2
+
3
+ @use "mixin";
4
+
5
+ @include mixin.styles;
6
+
@@ -0,0 +1,6 @@
1
+ @use "../../settings/warnings--internal";
2
+
3
+ @include warnings--internal.component-scss-file-warning("language-navigation");
4
+
5
+ @import "index";
6
+
@@ -0,0 +1,68 @@
1
+ @use "../../base";
2
+
3
+ /// @access private
4
+ @mixin styles {
5
+ .govuk-language-navigation {
6
+ @include base.govuk-font($size: 19);
7
+
8
+ @include base.govuk-responsive-margin(6, "bottom");
9
+ color: base.govuk-functional-colour(text);
10
+ }
11
+
12
+ .govuk-language-navigation__list {
13
+ display: inline-flex;
14
+ flex-wrap: wrap;
15
+ row-gap: base.govuk-spacing(2);
16
+ margin: 0;
17
+ padding: 0;
18
+ list-style-type: none;
19
+ }
20
+
21
+ .govuk-language-navigation__list-item {
22
+ display: flex;
23
+ align-items: center;
24
+
25
+ &:not(:last-child) {
26
+ &::after {
27
+ content: "";
28
+ display: block;
29
+ height: 1em;
30
+ margin-right: base.govuk-spacing(2);
31
+ margin-left: base.govuk-spacing(2);
32
+ border-right: 1px solid;
33
+ border-right-color: base.govuk-functional-colour(border);
34
+ }
35
+ }
36
+ }
37
+
38
+ .govuk-language-navigation__link {
39
+ @include base.govuk-link-common;
40
+ @include base.govuk-link-style-default;
41
+ }
42
+
43
+ .govuk-language-navigation--inverse {
44
+ color: base.govuk-functional-colour(inverse-text);
45
+
46
+ .govuk-language-navigation__link {
47
+ @include base.govuk-link-style-inverse;
48
+ }
49
+
50
+ .govuk-language-navigation__list-item::after {
51
+ border-right-color: currentcolor;
52
+ }
53
+ }
54
+
55
+ // Ensure the Language navigation has enough
56
+ // spacing with the rest of the Service Navigation
57
+ .govuk-service-navigation .govuk-language-navigation {
58
+ // Slightly smaller margin because the Service Navigation's menu toggle
59
+ // has a little margin underneath it already.
60
+ margin-top: base.govuk-spacing(1);
61
+ margin-bottom: base.govuk-spacing(3);
62
+
63
+ @media #{base.govuk-from-breakpoint(tablet)} {
64
+ margin-top: base.govuk-spacing(3);
65
+ }
66
+ }
67
+ }
68
+
@@ -5,13 +5,14 @@
5
5
  /// @access private
6
6
  @mixin styles {
7
7
  .govuk-notification-banner {
8
+ --_govuk-notification-banner-colour: #{base.govuk-functional-colour(brand)};
9
+ --_govuk-notification-banner-title-text-colour: #{base.govuk-functional-colour(inverse-text)};
10
+
8
11
  @include base.govuk-font($size: 19);
9
12
  @include base.govuk-responsive-margin(8, "bottom");
10
13
 
11
14
  border: base.$govuk-border-width solid;
12
- border-color: base.govuk-functional-colour(brand);
13
-
14
- background-color: base.govuk-functional-colour(brand);
15
+ border-color: var(--_govuk-notification-banner-colour);
15
16
 
16
17
  &:focus {
17
18
  outline: base.$govuk-focus-width solid;
@@ -26,6 +27,9 @@
26
27
  // text in high contrast mode
27
28
  border-bottom: 1px solid transparent;
28
29
 
30
+ color: var(--_govuk-notification-banner-title-text-colour);
31
+ background-color: var(--_govuk-notification-banner-colour);
32
+
29
33
  @media #{base.govuk-from-breakpoint(tablet)} {
30
34
  padding: 2px base.govuk-spacing(4) base.govuk-spacing(1);
31
35
  }
@@ -38,7 +42,6 @@
38
42
  @include base.govuk-typography-weight-bold;
39
43
  margin: 0;
40
44
  padding: 0;
41
- color: base.govuk-colour("white");
42
45
  }
43
46
 
44
47
  .govuk-notification-banner__content {
@@ -87,9 +90,7 @@
87
90
  }
88
91
 
89
92
  .govuk-notification-banner--success {
90
- border-color: base.govuk-functional-colour(success);
91
-
92
- background-color: base.govuk-functional-colour(success);
93
+ --_govuk-notification-banner-colour: #{base.govuk-functional-colour(success)};
93
94
 
94
95
  .govuk-notification-banner__link {
95
96
  @include base.govuk-link-style-success;
@@ -11,6 +11,7 @@
11
11
  padding: base.govuk-spacing(7) - base.$govuk-border-width;
12
12
 
13
13
  border: base.$govuk-border-width solid transparent;
14
+ color: base.govuk-functional-colour(text);
14
15
 
15
16
  text-align: center;
16
17
 
@@ -35,17 +36,6 @@
35
36
  }
36
37
  }
37
38
 
38
- .govuk-panel--confirmation {
39
- color: base.govuk-colour("white");
40
- background: base.govuk-colour("green");
41
-
42
- @media print {
43
- border-color: currentcolor;
44
- color: base.govuk-functional-colour(text);
45
- background: none;
46
- }
47
- }
48
-
49
39
  .govuk-panel__title {
50
40
  @include base.govuk-font-size($size: 48);
51
41
  @include base.govuk-typography-weight-bold;
@@ -53,8 +43,52 @@
53
43
  margin-bottom: base.govuk-spacing(6);
54
44
  }
55
45
 
56
- .govuk-panel__title:last-child {
46
+ // Remove bottom spacing from anything at the end of the Panel's content
47
+ // to stop the Panel's padding spacing from becoming too large.
48
+ .govuk-panel__title:last-child,
49
+ .govuk-panel__body > :last-child,
50
+ .govuk-panel__actions > :last-child {
57
51
  margin-bottom: 0;
58
52
  }
53
+
54
+ // On larger screens if the Panel actions have a button group,
55
+ // then we want to adjust the spacing a bit to avoid the button group
56
+ // making the Panel's padding spacing being too large.
57
+ @media #{base.govuk-from-breakpoint(tablet)} {
58
+ .govuk-panel__actions > .govuk-button-group:last-child {
59
+ margin-bottom: -1 * base.govuk-spacing(2);
60
+ }
61
+ }
62
+
63
+ // When the panel shows some actions, make sure they have some spacing
64
+ // from the panel's content
65
+ .govuk-panel__body:not(:last-child) {
66
+ margin-bottom: base.govuk-spacing(7);
67
+ }
68
+
69
+ .govuk-panel--confirmation {
70
+ --govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
71
+ background: base.govuk-functional-colour(success);
72
+ }
73
+
74
+ .govuk-panel--interruption {
75
+ --govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
76
+ background: base.govuk-functional-colour(brand);
77
+ text-align: left;
78
+
79
+ // Smaller title to go alongside smaller body text.
80
+ .govuk-panel__title {
81
+ @include base.govuk-font-size($size: 36);
82
+ margin-bottom: base.govuk-spacing(3);
83
+ }
84
+ }
85
+
86
+ @media print {
87
+ .govuk-panel {
88
+ --govuk-text-colour: inherit;
89
+ border-color: currentcolor;
90
+ background: none;
91
+ }
92
+ }
59
93
  }
60
94
 
@@ -46,7 +46,7 @@
46
46
  100% - #{($govuk-radios-label-padding-left-right + $govuk-touch-target-size + base.govuk-spacing(3))}
47
47
  );
48
48
  margin-bottom: 0;
49
- padding: (base.govuk-spacing(1) + base.$govuk-border-width-form-element) base.govuk-spacing(3);
49
+ padding: (base.govuk-spacing(1) + base.$govuk-border-width-form-element) $govuk-radios-label-padding-left-right;
50
50
  cursor: pointer;
51
51
  // remove 300ms pause on mobile
52
52
  touch-action: manipulation;
@@ -227,6 +227,12 @@
227
227
  }
228
228
 
229
229
  .govuk-radios__label {
230
+ // Recalculate max-width to account for the smaller radio size
231
+ // 1px comes from padding-left (defined below)
232
+ max-width: calc(
233
+ 100% - #{($govuk-touch-target-size - $input-offset) + $govuk-radios-label-padding-left-right + 1px}
234
+ );
235
+
230
236
  // Create a tiny space between the small radio hover state so that it
231
237
  // doesn't clash with the label
232
238
  padding-left: 1px;
@@ -34,13 +34,6 @@
34
34
  }
35
35
  }
36
36
 
37
- .govuk-select option:active,
38
- .govuk-select option:checked,
39
- .govuk-select:focus::-ms-value {
40
- color: base.govuk-colour("white");
41
- background-color: base.govuk-colour("blue");
42
- }
43
-
44
37
  .govuk-select--error {
45
38
  border-color: base.govuk-functional-colour(error);
46
39
 
@@ -14,8 +14,34 @@
14
14
  border-bottom-width: 1px;
15
15
  border-bottom-style: solid;
16
16
  border-bottom-color: $govuk-service-navigation-border-colour;
17
- color: $govuk-service-navigation-text-colour;
17
+ // Ensure that both raw content and content with typography classes
18
+ // will pick up the correct colour by setting both `--govuk-text-colour`
19
+ // and `color`.
20
+ --govuk-text-colour: #{$govuk-service-navigation-text-colour};
21
+ color: base.govuk-functional-colour(text);
18
22
  background-color: $govuk-service-navigation-background;
23
+
24
+ @media print {
25
+ border-bottom-color: currentcolor;
26
+ background-color: transparent;
27
+ }
28
+ }
29
+
30
+ .govuk-service-navigation__inlining-container {
31
+ display: flex;
32
+ flex-wrap: wrap;
33
+ align-items: baseline;
34
+
35
+ .govuk-service-navigation__container {
36
+ // Expand the container to shift the `end` slot to the right
37
+ flex-grow: 1;
38
+
39
+ // Ensure some space between the `end` slot and the container
40
+ // when displayed inline
41
+ &:not(:last-child) {
42
+ margin-right: base.govuk-spacing(6);
43
+ }
44
+ }
19
45
  }
20
46
 
21
47
  .govuk-service-navigation__container {
@@ -23,9 +49,16 @@
23
49
  flex-direction: column;
24
50
  align-items: start;
25
51
 
52
+ // Avoid the end slot rendering on the right of the container
53
+ // in small viewports by ensuring the container is full width
54
+ @media #{base.govuk-until-breakpoint(tablet)} {
55
+ width: 100%;
56
+ }
57
+
26
58
  @media #{base.govuk-from-breakpoint(tablet)} {
27
59
  flex-direction: row;
28
60
  flex-wrap: wrap;
61
+ align-items: center;
29
62
  }
30
63
  }
31
64
 
@@ -61,6 +94,10 @@
61
94
  @include base.govuk-responsive-margin(6, $direction: right);
62
95
  }
63
96
  }
97
+
98
+ @media print {
99
+ border-color: currentcolor;
100
+ }
64
101
  }
65
102
 
66
103
  // Remove the top margin of the first nav item if there is a service name but
@@ -200,16 +237,22 @@
200
237
  // Remove bottom border to add width-container ones
201
238
  border-bottom: none;
202
239
 
203
- // Set colour here so non-link text (service name, slot content) can
204
- // use it too.
205
- color: base.govuk-colour("white");
206
-
240
+ --govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
207
241
  background-color: base.govuk-functional-colour(brand);
208
242
 
243
+ @media print {
244
+ --govuk-text-colour: #{base.govuk-functional-colour(print-text)};
245
+ background-color: transparent;
246
+ }
247
+
209
248
  .govuk-width-container {
210
249
  border-width: 1px 0;
211
250
  border-style: solid;
212
251
  border-color: $govuk-service-navigation-border-colour;
252
+
253
+ @media print {
254
+ border-color: currentcolor;
255
+ }
213
256
  }
214
257
 
215
258
  // Subtract 1px of space to account for the extra border-top
@@ -220,12 +263,15 @@
220
263
  // Override the 'active' border colour
221
264
  .govuk-service-navigation__item,
222
265
  .govuk-service-navigation__service-name {
223
- border-color: base.govuk-colour("white");
266
+ border-color: currentcolor;
224
267
  }
225
268
 
226
- // Override link styles
227
- .govuk-service-navigation__link {
228
- @include base.govuk-link-style-inverse;
269
+ // Override link styles if on screens
270
+ // In print, we want the normal link styles to still apply
271
+ @media not print {
272
+ .govuk-service-navigation__link {
273
+ @include base.govuk-link-style-text;
274
+ }
229
275
  }
230
276
 
231
277
  // Override mobile menu toggle colour when not focused
@@ -7,7 +7,7 @@
7
7
  // `$govuk-output-custom-properties` is true or not to help with checking if
8
8
  // multiple stylesheets are outputting the same version
9
9
  :root {
10
- --govuk-frontend-version: "6.2.0";
10
+ --govuk-frontend-version: "6.5.1";
11
11
  }
12
12
  }
13
13
 
@@ -14,6 +14,7 @@
14
14
  @media print {
15
15
  // Use 'true black' to avoid printers using colour ink to print body text
16
16
  --govuk-text-colour: #{govuk-functional-colour("print-text")};
17
+ --govuk-input-border-colour: #{govuk-functional-colour("print-text")};
17
18
  }
18
19
  }
19
20
  }