govuk_tech_docs 5.2.2 → 6.0.0.beta

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 (145) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.md +15 -0
  4. data/README.md +11 -3
  5. data/example/config/tech-docs.yml +1 -1
  6. data/govuk_tech_docs.gemspec +1 -1
  7. data/lib/assets/stylesheets/_core.scss +1 -0
  8. data/lib/assets/stylesheets/_govuk_tech_docs.scss +13 -15
  9. data/lib/assets/stylesheets/modules/_app-pane.scss +3 -3
  10. data/lib/assets/stylesheets/modules/_page-review.scss +4 -4
  11. data/lib/assets/stylesheets/modules/_search.scss +3 -3
  12. data/lib/assets/stylesheets/modules/_service-navigation.scss +5 -0
  13. data/lib/assets/stylesheets/modules/_technical-documentation.scss +7 -7
  14. data/lib/assets/stylesheets/modules/_toc.scss +13 -13
  15. data/lib/assets/stylesheets/palette/_syntax-highlighting.scss +9 -7
  16. data/lib/govuk_tech_docs/meta_tags.rb +1 -1
  17. data/lib/govuk_tech_docs/version.rb +1 -1
  18. data/lib/source/layouts/_header.erb +2 -16
  19. data/lib/source/layouts/_service_navigation.erb +27 -0
  20. data/lib/source/layouts/core.erb +7 -7
  21. data/node_modules/govuk-frontend/dist/govuk/_base.scss +1 -0
  22. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +87 -229
  23. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +88 -229
  24. data/node_modules/govuk-frontend/dist/govuk/all.mjs +0 -1
  25. data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico +0 -0
  26. data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg +1 -1
  27. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
  28. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
  29. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
  30. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png +0 -0
  31. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  32. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +18 -15
  33. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +1 -126
  34. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +1 -126
  35. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +2 -2
  36. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +2 -2
  37. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +18 -21
  38. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +2 -2
  39. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +20 -135
  40. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +20 -135
  41. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +19 -9
  42. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +7 -6
  43. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +2 -5
  44. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +5 -0
  45. data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +6 -4
  46. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +1 -1
  47. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +4 -2
  48. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +1 -1
  49. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +1 -126
  50. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +1 -126
  51. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +30 -38
  52. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +36 -132
  53. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +36 -132
  54. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +35 -6
  55. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +30 -27
  56. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +89 -449
  57. data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +1 -1
  58. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +14 -20
  59. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +2 -1
  60. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +10 -8
  61. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +12 -11
  62. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +4 -4
  63. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +2 -2
  64. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +1 -126
  65. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +1 -126
  66. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +12 -6
  67. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +8 -7
  68. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +6 -11
  69. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +55 -76
  70. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +30 -2
  71. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +30 -2
  72. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +30 -2
  73. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +7 -2
  74. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +25 -21
  75. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +7 -8
  76. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +9 -6
  77. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +66 -31
  78. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +7 -5
  79. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +5 -10
  80. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +5 -4
  81. data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +0 -1
  82. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +2 -2
  83. data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +2 -1
  84. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +6 -20
  85. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.scss +17 -0
  86. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +15 -0
  87. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +17 -0
  88. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.scss +5 -0
  89. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  90. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +168 -82
  91. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +41 -6
  92. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
  93. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +24 -40
  94. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +172 -33
  95. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +1 -1
  96. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +6 -30
  97. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +1 -126
  98. data/node_modules/govuk-frontend/dist/govuk/init.mjs +1 -2
  99. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss +1 -1
  100. data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss +2 -1
  101. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss +1 -1
  102. data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +3 -7
  103. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +2 -2
  104. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +1 -1
  105. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +0 -2
  106. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +5 -5
  107. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +3 -188
  108. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +366 -0
  109. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +9 -255
  110. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss +117 -25
  111. data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.scss +18 -0
  112. data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss +3 -14
  113. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +0 -9
  114. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +12 -189
  115. data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +0 -1
  116. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +4 -2
  117. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +2 -0
  118. data/package-lock.json +3228 -4
  119. data/package.json +1 -1
  120. metadata +10 -26
  121. data/node_modules/govuk-frontend/dist/govuk/all.scss +0 -9
  122. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.ico +0 -0
  123. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.svg +0 -1
  124. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-crest.svg +0 -1
  125. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-180.png +0 -0
  126. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-192.png +0 -0
  127. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-512.png +0 -0
  128. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-mask.svg +0 -1
  129. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-opengraph-image.png +0 -0
  130. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/manifest.json +0 -39
  131. data/node_modules/govuk-frontend/dist/govuk/components/_all.scss +0 -10
  132. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +0 -238
  133. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +0 -230
  134. data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +0 -89
  135. data/node_modules/govuk-frontend/dist/govuk/core/_all.scss +0 -10
  136. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +0 -15
  137. data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss +0 -10
  138. data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss +0 -10
  139. data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss +0 -9
  140. data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss +0 -10
  141. data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss +0 -10
  142. data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss +0 -65
  143. data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss +0 -10
  144. data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss +0 -349
  145. data/node_modules/govuk-frontend/dist/govuk-prototype-kit/functions.js +0 -25
@@ -16,21 +16,16 @@
16
16
  max-width: 100%;
17
17
  height: govuk-px-to-rem(40px);
18
18
  padding: govuk-spacing(1);
19
- border: $govuk-border-width-form-element solid $govuk-input-border-colour;
19
+ border: $govuk-border-width-form-element solid;
20
+ border-color: govuk-functional-colour(input-border);
20
21
 
21
22
  // Default user agent colours for selects can have low contrast,
22
23
  // and may look disabled (#2435)
23
- color: $govuk-text-colour;
24
+ color: govuk-functional-colour(text);
24
25
  background-color: govuk-colour("white");
25
26
 
26
27
  &:focus {
27
- outline: $govuk-focus-width solid $govuk-focus-colour;
28
- // Ensure outline appears outside of the element
29
- outline-offset: 0;
30
- // Double the border by adding its width again. Use `box-shadow` to do
31
- // this instead of changing `border-width` (which changes element size)
32
- // and since `outline` is already used for the yellow focus state.
33
- box-shadow: inset 0 0 0 $govuk-border-width-form-element;
28
+ @include govuk-focused-form-input;
34
29
  }
35
30
 
36
31
  &:disabled {
@@ -48,10 +43,10 @@
48
43
  }
49
44
 
50
45
  .govuk-select--error {
51
- border-color: $govuk-error-colour;
46
+ border-color: govuk-functional-colour(error);
52
47
 
53
48
  &:focus {
54
- border-color: $govuk-input-border-colour;
49
+ border-color: govuk-functional-colour(input-border);
55
50
  }
56
51
  }
57
52
  }
@@ -1,25 +1,16 @@
1
1
  @include govuk-exports("govuk/component/service-navigation") {
2
2
  $govuk-service-navigation-active-link-border-width: govuk-spacing(1);
3
- $govuk-service-navigation-background: govuk-colour("light-grey");
4
- $govuk-service-navigation-border-colour: $govuk-border-colour;
5
-
6
- // We make the link colour a little darker than normal here so that it has
7
- // better perceptual contrast with the navigation background.
8
- $govuk-service-navigation-link-colour: govuk-shade($govuk-link-colour, 10%);
3
+ $govuk-service-navigation-text-colour: govuk-functional-colour(surface-text);
4
+ $govuk-service-navigation-background: govuk-functional-colour(surface-background);
5
+ $govuk-service-navigation-border-colour: govuk-functional-colour(surface-border);
9
6
 
10
7
  .govuk-service-navigation {
8
+ @include govuk-font($size: 19);
11
9
  border-bottom-width: 1px;
12
10
  border-bottom-style: solid;
13
- @include _govuk-rebrand(
14
- "border-bottom-color",
15
- $from: $govuk-service-navigation-border-colour,
16
- $to: $_govuk-rebrand-border-colour-on-blue-tint-95
17
- );
18
- @include _govuk-rebrand(
19
- "background-color",
20
- $from: $govuk-service-navigation-background,
21
- $to: $_govuk-rebrand-template-background-colour
22
- );
11
+ border-bottom-color: $govuk-service-navigation-border-colour;
12
+ color: $govuk-service-navigation-text-colour;
13
+ background-color: $govuk-service-navigation-background;
23
14
  }
24
15
 
25
16
  .govuk-service-navigation__container {
@@ -27,7 +18,7 @@
27
18
  flex-direction: column;
28
19
  align-items: start;
29
20
 
30
- @include govuk-media-query($from: tablet) {
21
+ @media #{govuk-from-breakpoint(tablet)} {
31
22
  flex-direction: row;
32
23
  flex-wrap: wrap;
33
24
  }
@@ -39,26 +30,27 @@
39
30
  .govuk-service-navigation__service-name {
40
31
  position: relative;
41
32
  margin: govuk-spacing(2) 0;
42
- border: 0 solid $govuk-service-navigation-link-colour;
43
33
 
44
- @include govuk-media-query($from: tablet) {
34
+ // A border matching the link colour is used to mark the active section –
35
+ // see the `govuk-service-navigation__item--active` class
36
+ border-width: 0;
37
+ border-style: solid;
38
+ border-color: govuk-functional-colour(link);
39
+
40
+ @media #{govuk-from-breakpoint(tablet)} {
45
41
  // inline-block is used as a fallback for browsers that don't support flexbox
46
42
  display: inline-block;
47
43
 
48
44
  margin-top: 0;
49
45
  margin-bottom: 0;
50
- padding: govuk-spacing(4) 0;
46
+ padding: govuk-spacing(3) 0;
51
47
 
52
- @include _govuk-rebrand {
53
- padding: govuk-spacing(3) 0;
54
-
55
- // More magic numbers ahoy:
56
- // 29 is the desired height of the element (60), minus top and bottom
57
- // padding (2×15), minus bottom border (1); 19 is the font-size at this
58
- // point. This gives us the perfect fractional line height to make the
59
- // overall component 60px high
60
- line-height: (29 / 19);
61
- }
48
+ // More magic numbers ahoy:
49
+ // 29 is the desired height of the element (60), minus top and bottom
50
+ // padding (2×15), minus bottom border (1); 19 is the font-size at this
51
+ // point. This gives us the perfect fractional line height to make the
52
+ // overall component 60px high
53
+ line-height: (29 / 19);
62
54
 
63
55
  &:not(:last-child) {
64
56
  @include govuk-responsive-margin(6, $direction: right);
@@ -78,7 +70,7 @@
78
70
  }
79
71
 
80
72
  .govuk-service-navigation__item--active {
81
- @include govuk-media-query($until: tablet) {
73
+ @media #{govuk-until-breakpoint(tablet)} {
82
74
  // Negative offset the left margin so we can place a current page indicator
83
75
  // to the left without misaligning the list item text.
84
76
  margin-left: ((govuk-spacing(2) + $govuk-service-navigation-active-link-border-width) * -1);
@@ -86,12 +78,8 @@
86
78
  border-left-width: $govuk-service-navigation-active-link-border-width;
87
79
  }
88
80
 
89
- @include govuk-media-query($from: tablet) {
90
- @include _govuk-rebrand(
91
- "padding-bottom",
92
- $from: govuk-spacing(4) - $govuk-service-navigation-active-link-border-width,
93
- $to: govuk-spacing(3) - $govuk-service-navigation-active-link-border-width
94
- );
81
+ @media #{govuk-from-breakpoint(tablet)} {
82
+ padding-bottom: govuk-spacing(3) - $govuk-service-navigation-active-link-border-width;
95
83
  border-bottom-width: $govuk-service-navigation-active-link-border-width;
96
84
  }
97
85
  }
@@ -100,12 +88,6 @@
100
88
  @include govuk-link-common;
101
89
  @include govuk-link-style-no-underline;
102
90
  @include govuk-link-style-no-visited-state;
103
-
104
- &:not(:hover):not(:focus) {
105
- // We set the colour here as we don't want to override the hover or
106
- // focus colours
107
- color: $govuk-service-navigation-link-colour;
108
- }
109
91
  }
110
92
 
111
93
  //
@@ -113,7 +95,7 @@
113
95
  //
114
96
 
115
97
  .govuk-service-navigation__service-name {
116
- @include govuk-font($size: 19, $weight: bold);
98
+ @include govuk-typography-weight-bold;
117
99
  }
118
100
 
119
101
  // Annoyingly this requires a compound selector in order to overcome the
@@ -139,7 +121,7 @@
139
121
  margin: govuk-spacing(2) 0;
140
122
  padding: 0;
141
123
  border: 0;
142
- color: $govuk-service-navigation-link-colour;
124
+ color: govuk-functional-colour(link);
143
125
  background: none;
144
126
  word-break: break-all;
145
127
  cursor: pointer;
@@ -172,7 +154,6 @@
172
154
  }
173
155
 
174
156
  .govuk-service-navigation__list {
175
- @include govuk-font($size: 19);
176
157
  margin: 0;
177
158
  margin-bottom: govuk-spacing(3);
178
159
  padding: 0;
@@ -184,7 +165,7 @@
184
165
  // readers would pointlessly announce.
185
166
  // - Fixes an NVDA issue in Firefox and Chrome <= 124 where it would read
186
167
  // all of the links as a run-on sentence.
187
- @include govuk-media-query($from: tablet) {
168
+ @media #{govuk-from-breakpoint(tablet)} {
188
169
  display: flex;
189
170
  flex-wrap: wrap;
190
171
  margin-bottom: 0;
@@ -211,42 +192,40 @@
211
192
 
212
193
  // Inverted colour scheme style intended for product pages
213
194
  .govuk-service-navigation--inverse {
214
- @include _govuk-rebrand {
215
- // Remove bottom border to add width-container ones
216
- border-bottom: none;
195
+ // Remove bottom border to add width-container ones
196
+ border-bottom: none;
217
197
 
218
- // Set colour here so non-link text (service name, slot content) can
219
- // use it too.
220
- color: govuk-colour("white");
198
+ // Set colour here so non-link text (service name, slot content) can
199
+ // use it too.
200
+ color: govuk-colour("white");
221
201
 
222
- background-color: $govuk-brand-colour;
202
+ background-color: govuk-functional-colour(brand);
223
203
 
224
- .govuk-width-container {
225
- border-width: 1px 0;
226
- border-style: solid;
227
- border-color: $_govuk-rebrand-border-colour-on-blue-tint-95;
228
- }
204
+ .govuk-width-container {
205
+ border-width: 1px 0;
206
+ border-style: solid;
207
+ border-color: $govuk-service-navigation-border-colour;
208
+ }
229
209
 
230
- // Subtract 1px of space to account for the extra border-top
231
- .govuk-service-navigation__container {
232
- margin-top: -1px;
233
- }
210
+ // Subtract 1px of space to account for the extra border-top
211
+ .govuk-service-navigation__container {
212
+ margin-top: -1px;
213
+ }
234
214
 
235
- // Override the 'active' border colour
236
- .govuk-service-navigation__item,
237
- .govuk-service-navigation__service-name {
238
- border-color: govuk-colour("white");
239
- }
215
+ // Override the 'active' border colour
216
+ .govuk-service-navigation__item,
217
+ .govuk-service-navigation__service-name {
218
+ border-color: govuk-colour("white");
219
+ }
240
220
 
241
- // Override link styles
242
- .govuk-service-navigation__link {
243
- @include govuk-link-style-inverse;
244
- }
221
+ // Override link styles
222
+ .govuk-service-navigation__link {
223
+ @include govuk-link-style-inverse;
224
+ }
245
225
 
246
- // Override mobile menu toggle colour when not focused
247
- .govuk-service-navigation__toggle:not(:focus) {
248
- color: currentcolor;
249
- }
226
+ // Override mobile menu toggle colour when not focused
227
+ .govuk-service-navigation__toggle:not(:focus) {
228
+ color: currentcolor;
250
229
  }
251
230
  }
252
231
  }
@@ -210,9 +210,9 @@
210
210
  }
211
211
  if (this.mql.matches) {
212
212
  this.$menu.removeAttribute('hidden');
213
- this.$menuButton.setAttribute('hidden', '');
213
+ setAttributes(this.$menuButton, attributesForHidingButton);
214
214
  } else {
215
- this.$menuButton.removeAttribute('hidden');
215
+ removeAttributes(this.$menuButton, Object.keys(attributesForHidingButton));
216
216
  this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
217
217
  if (this.menuIsOpen) {
218
218
  this.$menu.removeAttribute('hidden');
@@ -227,6 +227,34 @@
227
227
  }
228
228
  }
229
229
  ServiceNavigation.moduleName = 'govuk-service-navigation';
230
+ const attributesForHidingButton = {
231
+ hidden: '',
232
+ 'aria-hidden': 'true'
233
+ };
234
+
235
+ /**
236
+ * Sets a group of attributes on the given element
237
+ *
238
+ * @param {Element} $element - The element to set the attribute on
239
+ * @param {{[attributeName: string]: string}} attributes - The attributes to set
240
+ */
241
+ function setAttributes($element, attributes) {
242
+ for (const attributeName in attributes) {
243
+ $element.setAttribute(attributeName, attributes[attributeName]);
244
+ }
245
+ }
246
+
247
+ /**
248
+ * Removes a list of attributes from the given element
249
+ *
250
+ * @param {Element} $element - The element to remove the attributes from
251
+ * @param {string[]} attributeNames - The names of the attributes to remove
252
+ */
253
+ function removeAttributes($element, attributeNames) {
254
+ for (const attributeName of attributeNames) {
255
+ $element.removeAttribute(attributeName);
256
+ }
257
+ }
230
258
 
231
259
  exports.ServiceNavigation = ServiceNavigation;
232
260
 
@@ -204,9 +204,9 @@ class ServiceNavigation extends Component {
204
204
  }
205
205
  if (this.mql.matches) {
206
206
  this.$menu.removeAttribute('hidden');
207
- this.$menuButton.setAttribute('hidden', '');
207
+ setAttributes(this.$menuButton, attributesForHidingButton);
208
208
  } else {
209
- this.$menuButton.removeAttribute('hidden');
209
+ removeAttributes(this.$menuButton, Object.keys(attributesForHidingButton));
210
210
  this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
211
211
  if (this.menuIsOpen) {
212
212
  this.$menu.removeAttribute('hidden');
@@ -221,6 +221,34 @@ class ServiceNavigation extends Component {
221
221
  }
222
222
  }
223
223
  ServiceNavigation.moduleName = 'govuk-service-navigation';
224
+ const attributesForHidingButton = {
225
+ hidden: '',
226
+ 'aria-hidden': 'true'
227
+ };
228
+
229
+ /**
230
+ * Sets a group of attributes on the given element
231
+ *
232
+ * @param {Element} $element - The element to set the attribute on
233
+ * @param {{[attributeName: string]: string}} attributes - The attributes to set
234
+ */
235
+ function setAttributes($element, attributes) {
236
+ for (const attributeName in attributes) {
237
+ $element.setAttribute(attributeName, attributes[attributeName]);
238
+ }
239
+ }
240
+
241
+ /**
242
+ * Removes a list of attributes from the given element
243
+ *
244
+ * @param {Element} $element - The element to remove the attributes from
245
+ * @param {string[]} attributeNames - The names of the attributes to remove
246
+ */
247
+ function removeAttributes($element, attributeNames) {
248
+ for (const attributeName of attributeNames) {
249
+ $element.removeAttribute(attributeName);
250
+ }
251
+ }
224
252
 
225
253
  export { ServiceNavigation };
226
254
  //# sourceMappingURL=service-navigation.bundle.mjs.map
@@ -63,9 +63,9 @@ class ServiceNavigation extends Component {
63
63
  }
64
64
  if (this.mql.matches) {
65
65
  this.$menu.removeAttribute('hidden');
66
- this.$menuButton.setAttribute('hidden', '');
66
+ setAttributes(this.$menuButton, attributesForHidingButton);
67
67
  } else {
68
- this.$menuButton.removeAttribute('hidden');
68
+ removeAttributes(this.$menuButton, Object.keys(attributesForHidingButton));
69
69
  this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());
70
70
  if (this.menuIsOpen) {
71
71
  this.$menu.removeAttribute('hidden');
@@ -80,6 +80,34 @@ class ServiceNavigation extends Component {
80
80
  }
81
81
  }
82
82
  ServiceNavigation.moduleName = 'govuk-service-navigation';
83
+ const attributesForHidingButton = {
84
+ hidden: '',
85
+ 'aria-hidden': 'true'
86
+ };
87
+
88
+ /**
89
+ * Sets a group of attributes on the given element
90
+ *
91
+ * @param {Element} $element - The element to set the attribute on
92
+ * @param {{[attributeName: string]: string}} attributes - The attributes to set
93
+ */
94
+ function setAttributes($element, attributes) {
95
+ for (const attributeName in attributes) {
96
+ $element.setAttribute(attributeName, attributes[attributeName]);
97
+ }
98
+ }
99
+
100
+ /**
101
+ * Removes a list of attributes from the given element
102
+ *
103
+ * @param {Element} $element - The element to remove the attributes from
104
+ * @param {string[]} attributeNames - The names of the attributes to remove
105
+ */
106
+ function removeAttributes($element, attributeNames) {
107
+ for (const attributeName of attributeNames) {
108
+ $element.removeAttribute(attributeName);
109
+ }
110
+ }
83
111
 
84
112
  export { ServiceNavigation };
85
113
  //# sourceMappingURL=service-navigation.mjs.map
@@ -20,9 +20,14 @@
20
20
  }
21
21
 
22
22
  &:focus {
23
- outline: $govuk-focus-width solid $govuk-focus-colour;
23
+ outline: $govuk-focus-width solid;
24
+ outline-color: govuk-functional-colour(focus);
24
25
  outline-offset: 0;
25
- background-color: $govuk-focus-colour;
26
+ background-color: govuk-functional-colour(focus);
27
+
28
+ @media (forced-colors: active) {
29
+ outline-offset: (0 - $govuk-focus-width);
30
+ }
26
31
 
27
32
  // Undo unwanted changes when global styles are enabled
28
33
  @if $govuk-global-styles {
@@ -2,7 +2,7 @@
2
2
  .govuk-summary-list {
3
3
  @include govuk-font($size: 19);
4
4
  @include govuk-text-colour;
5
- @include govuk-media-query($from: tablet) {
5
+ @media #{govuk-from-breakpoint(tablet)} {
6
6
  display: table;
7
7
  width: 100%;
8
8
  table-layout: fixed; // Required to allow us to wrap words that overflow.
@@ -13,12 +13,13 @@
13
13
  }
14
14
 
15
15
  .govuk-summary-list__row {
16
- border-bottom: 1px solid $govuk-border-colour;
16
+ border-bottom: 1px solid;
17
+ border-bottom-color: govuk-functional-colour(border);
17
18
 
18
- @include govuk-media-query($until: tablet) {
19
+ @media #{govuk-until-breakpoint(tablet)} {
19
20
  margin-bottom: govuk-spacing(3);
20
21
  }
21
- @include govuk-media-query($from: tablet) {
22
+ @media #{govuk-from-breakpoint(tablet)} {
22
23
  display: table-row;
23
24
  }
24
25
  }
@@ -31,7 +32,7 @@
31
32
  // Provide an empty 'cell' for rows that don't have actions – otherwise the
32
33
  // bottom border is not drawn for that part of the row in some browsers.
33
34
  .govuk-summary-list__row--no-actions {
34
- @include govuk-media-query($from: tablet) {
35
+ @media #{govuk-from-breakpoint(tablet)} {
35
36
  &::after {
36
37
  content: "";
37
38
  display: table-cell;
@@ -45,7 +46,7 @@
45
46
  .govuk-summary-list__actions {
46
47
  margin: 0; // Reset default user agent styles
47
48
 
48
- @include govuk-media-query($from: tablet) {
49
+ @media #{govuk-from-breakpoint(tablet)} {
49
50
  display: table-cell;
50
51
  padding-top: govuk-spacing(2);
51
52
  padding-right: govuk-spacing(4);
@@ -55,7 +56,7 @@
55
56
 
56
57
  .govuk-summary-list__actions {
57
58
  margin-bottom: govuk-spacing(3);
58
- @include govuk-media-query($from: tablet) {
59
+ @media #{govuk-from-breakpoint(tablet)} {
59
60
  width: 20%;
60
61
  text-align: right;
61
62
  }
@@ -71,13 +72,13 @@
71
72
  .govuk-summary-list__key {
72
73
  margin-bottom: govuk-spacing(1);
73
74
  @include govuk-typography-weight-bold;
74
- @include govuk-media-query($from: tablet) {
75
+ @media #{govuk-from-breakpoint(tablet)} {
75
76
  width: 30%;
76
77
  }
77
78
  }
78
79
 
79
80
  .govuk-summary-list__value {
80
- @include govuk-media-query($until: tablet) {
81
+ @media #{govuk-until-breakpoint(tablet)} {
81
82
  margin-bottom: govuk-spacing(3);
82
83
  }
83
84
  }
@@ -101,12 +102,13 @@
101
102
  display: inline-block;
102
103
  }
103
104
 
104
- @include govuk-media-query($until: tablet) {
105
+ @media #{govuk-until-breakpoint(tablet)} {
105
106
  .govuk-summary-list__actions-list-item,
106
107
  .govuk-summary-card__action {
107
108
  margin-right: govuk-spacing(2);
108
109
  padding-right: govuk-spacing(2);
109
- border-right: 1px solid $govuk-border-colour;
110
+ border-right: 1px solid;
111
+ border-right-color: govuk-functional-colour(border);
110
112
  }
111
113
 
112
114
  .govuk-summary-list__actions-list-item:last-child,
@@ -117,7 +119,7 @@
117
119
  }
118
120
  }
119
121
 
120
- @include govuk-media-query($from: tablet) {
122
+ @media #{govuk-from-breakpoint(tablet)} {
121
123
  .govuk-summary-list__actions-list-item,
122
124
  .govuk-summary-card__action {
123
125
  margin-left: govuk-spacing(2);
@@ -126,7 +128,8 @@
126
128
 
127
129
  .govuk-summary-list__actions-list-item:not(:first-child),
128
130
  .govuk-summary-card__action:not(:first-child) {
129
- border-left: 1px solid $govuk-border-colour;
131
+ border-left: 1px solid;
132
+ border-left-color: govuk-functional-colour(border);
130
133
  }
131
134
 
132
135
  .govuk-summary-list__actions-list-item:first-child,
@@ -153,7 +156,7 @@
153
156
  }
154
157
 
155
158
  // Increase padding by 1px to compensate for 'missing' border
156
- @include govuk-media-query($from: tablet) {
159
+ @media #{govuk-from-breakpoint(tablet)} {
157
160
  .govuk-summary-list__key,
158
161
  .govuk-summary-list__value,
159
162
  .govuk-summary-list__actions {
@@ -167,7 +170,7 @@
167
170
  border: 0;
168
171
 
169
172
  // Increase padding by 1px to compensate for 'missing' border
170
- @include govuk-media-query($from: tablet) {
173
+ @media #{govuk-from-breakpoint(tablet)} {
171
174
  .govuk-summary-list__key,
172
175
  .govuk-summary-list__value,
173
176
  .govuk-summary-list__actions {
@@ -179,7 +182,8 @@
179
182
  // Additional block for the summary card
180
183
  .govuk-summary-card {
181
184
  @include govuk-responsive-margin(6, "bottom");
182
- border: 1px solid $govuk-border-colour;
185
+ border: 1px solid;
186
+ border-color: govuk-functional-colour(border);
183
187
  }
184
188
 
185
189
  .govuk-summary-card__title-wrapper {
@@ -188,9 +192,9 @@
188
192
  // Ensures the card header appears separate to the summary list in forced
189
193
  // colours mode
190
194
  border-bottom: 1px solid transparent;
191
- background-color: govuk-colour("light-grey");
195
+ background-color: govuk-colour("black", $variant: "tint-95");
192
196
 
193
- @include govuk-media-query($from: "tablet") {
197
+ @media #{govuk-from-breakpoint(tablet)} {
194
198
  display: flex;
195
199
  justify-content: space-between;
196
200
  flex-wrap: nowrap;
@@ -203,7 +207,7 @@
203
207
  @include govuk-text-colour;
204
208
  margin: govuk-spacing(1) govuk-spacing(4) govuk-spacing(2) 0;
205
209
 
206
- @include govuk-media-query($from: "tablet") {
210
+ @media #{govuk-from-breakpoint(tablet)} {
207
211
  margin-bottom: govuk-spacing(1);
208
212
  }
209
213
  }
@@ -218,7 +222,7 @@
218
222
  padding: 0;
219
223
  list-style: none;
220
224
 
221
- @include govuk-media-query($from: "tablet") {
225
+ @media #{govuk-from-breakpoint(tablet)} {
222
226
  justify-content: right;
223
227
  text-align: right;
224
228
  }
@@ -251,7 +255,7 @@
251
255
  .govuk-summary-card__content {
252
256
  padding: govuk-spacing(3) govuk-spacing(3) 0;
253
257
 
254
- @include govuk-media-query($from: "tablet") {
258
+ @media #{govuk-from-breakpoint(tablet)} {
255
259
  padding: govuk-spacing(3) govuk-spacing(4);
256
260
  }
257
261
 
@@ -9,13 +9,11 @@
9
9
  border-collapse: collapse;
10
10
  }
11
11
 
12
- @if $govuk-new-typography-scale {
13
- // Modifier for tables with a lot of data. Tables with lots of data benefit
14
- // from a smaller font size on small screens.
15
- .govuk-table--small-text-until-tablet {
16
- @include govuk-media-query($until: tablet) {
17
- @include govuk-font-size($size: 16);
18
- }
12
+ // Modifier for tables with a lot of data. Tables with lots of data benefit
13
+ // from a smaller font size on small screens.
14
+ .govuk-table--small-text-until-tablet {
15
+ @media #{govuk-until-breakpoint(tablet)} {
16
+ @include govuk-font-size($size: 16);
19
17
  }
20
18
  }
21
19
 
@@ -26,7 +24,8 @@
26
24
  .govuk-table__header,
27
25
  .govuk-table__cell {
28
26
  padding: govuk-spacing(2) govuk-spacing(4) govuk-spacing(2) 0;
29
- border-bottom: 1px solid $govuk-border-colour;
27
+ border-bottom: 1px solid;
28
+ border-bottom-color: govuk-functional-colour(border);
30
29
  text-align: left;
31
30
  vertical-align: top;
32
31
  }
@@ -46,11 +46,12 @@
46
46
 
47
47
  // GOV.UK Frontend JavaScript enabled
48
48
  .govuk-frontend-supported {
49
- @include govuk-media-query($from: tablet) {
49
+ @media #{govuk-from-breakpoint(tablet)} {
50
50
  .govuk-tabs__list {
51
51
  @include govuk-clearfix;
52
52
  margin-bottom: 0;
53
- border-bottom: 1px solid $govuk-border-colour;
53
+ border-bottom: 1px solid;
54
+ border-bottom-color: govuk-functional-colour(border);
54
55
  }
55
56
 
56
57
  .govuk-tabs__title {
@@ -66,7 +67,7 @@
66
67
  padding: govuk-spacing(2) govuk-spacing(4);
67
68
 
68
69
  float: left;
69
- background-color: govuk-colour("light-grey");
70
+ background-color: govuk-colour("black", $variant: "tint-95");
70
71
  text-align: center;
71
72
 
72
73
  &::before {
@@ -88,10 +89,11 @@
88
89
  padding-bottom: govuk-spacing(3) + $border-width;
89
90
  padding-left: govuk-spacing(4) - $border-width;
90
91
 
91
- border: $border-width solid $govuk-border-colour;
92
+ border: $border-width solid;
92
93
  border-bottom: 0;
94
+ border-color: govuk-functional-colour(border);
93
95
 
94
- background-color: $govuk-body-background-colour;
96
+ background-color: govuk-functional-colour(body-background);
95
97
 
96
98
  .govuk-tabs__tab {
97
99
  text-decoration: none;
@@ -116,8 +118,9 @@
116
118
  .govuk-tabs__panel {
117
119
  @include govuk-responsive-margin(0, "bottom");
118
120
  padding: govuk-spacing(6) govuk-spacing(4);
119
- border: 1px solid $govuk-border-colour;
121
+ border: 1px solid;
120
122
  border-top: 0;
123
+ border-color: govuk-functional-colour(border);
121
124
 
122
125
  & > :last-child {
123
126
  margin-bottom: 0;