govuk_tech_docs 5.2.1 → 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 (169) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +59 -0
  3. data/.npmrc +1 -0
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +19 -0
  6. data/README.md +13 -4
  7. data/example/config/tech-docs.yml +1 -1
  8. data/govuk_tech_docs.gemspec +2 -2
  9. data/lib/assets/stylesheets/_core.scss +1 -0
  10. data/lib/assets/stylesheets/_govuk_tech_docs.scss +13 -15
  11. data/lib/assets/stylesheets/modules/_app-pane.scss +3 -3
  12. data/lib/assets/stylesheets/modules/_page-review.scss +4 -4
  13. data/lib/assets/stylesheets/modules/_search.scss +3 -3
  14. data/lib/assets/stylesheets/modules/_service-navigation.scss +5 -0
  15. data/lib/assets/stylesheets/modules/_technical-documentation.scss +7 -7
  16. data/lib/assets/stylesheets/modules/_toc.scss +13 -13
  17. data/lib/assets/stylesheets/palette/_syntax-highlighting.scss +9 -7
  18. data/lib/govuk_tech_docs/meta_tags.rb +1 -1
  19. data/lib/govuk_tech_docs/version.rb +1 -1
  20. data/lib/source/layouts/_header.erb +2 -16
  21. data/lib/source/layouts/_service_navigation.erb +27 -0
  22. data/lib/source/layouts/core.erb +7 -7
  23. data/node_modules/govuk-frontend/dist/govuk/_base.scss +1 -0
  24. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +183 -300
  25. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +184 -300
  26. data/node_modules/govuk-frontend/dist/govuk/all.mjs +0 -1
  27. data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico +0 -0
  28. data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg +1 -1
  29. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
  30. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
  31. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
  32. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png +0 -0
  33. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +29 -2
  34. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  35. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +4 -10
  36. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +18 -15
  37. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +14 -137
  38. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +14 -137
  39. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +4 -4
  40. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +2 -2
  41. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +2 -2
  42. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +18 -21
  43. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +7 -5
  44. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +7 -5
  45. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +2 -2
  46. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +30 -143
  47. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +30 -143
  48. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +20 -10
  49. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +7 -6
  50. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +10 -5
  51. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +10 -5
  52. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +2 -5
  53. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +5 -0
  54. data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +6 -4
  55. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +1 -1
  56. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +4 -2
  57. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +8 -12
  58. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +8 -12
  59. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +2 -2
  60. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +1 -1
  61. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +10 -133
  62. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +10 -133
  63. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +30 -38
  64. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +46 -140
  65. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +46 -140
  66. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +36 -7
  67. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +30 -27
  68. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +89 -449
  69. data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +1 -1
  70. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +14 -20
  71. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +2 -1
  72. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +10 -8
  73. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +7 -5
  74. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +7 -5
  75. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +16 -11
  76. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +4 -4
  77. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +2 -2
  78. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +10 -133
  79. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +10 -133
  80. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +12 -6
  81. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +8 -7
  82. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +10 -5
  83. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +10 -5
  84. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +6 -11
  85. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +58 -74
  86. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +40 -7
  87. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +40 -7
  88. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +30 -2
  89. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +8 -4
  90. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +12 -19
  91. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +12 -19
  92. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +3 -9
  93. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +25 -21
  94. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +7 -8
  95. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +9 -6
  96. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +12 -13
  97. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +12 -13
  98. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +3 -3
  99. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +66 -31
  100. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +7 -5
  101. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +5 -10
  102. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +5 -4
  103. data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +0 -1
  104. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +2 -2
  105. data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +2 -1
  106. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +6 -20
  107. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_breakpoints.scss +17 -0
  108. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +15 -0
  109. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +17 -0
  110. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_index.scss +5 -0
  111. data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +5 -3
  112. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  113. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +187 -72
  114. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +41 -6
  115. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
  116. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +24 -40
  117. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +172 -33
  118. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +1 -1
  119. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +6 -30
  120. data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +4 -1
  121. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +5 -128
  122. data/node_modules/govuk-frontend/dist/govuk/init.mjs +53 -45
  123. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss +1 -1
  124. data/node_modules/govuk-frontend/dist/govuk/objects/_form-group.scss +2 -1
  125. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss +1 -1
  126. data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +3 -7
  127. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +2 -2
  128. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +1 -1
  129. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +0 -2
  130. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +5 -5
  131. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +3 -188
  132. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +366 -0
  133. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +9 -255
  134. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss +117 -25
  135. data/node_modules/govuk-frontend/dist/govuk/settings/_custom-properties.scss +18 -0
  136. data/node_modules/govuk-frontend/dist/govuk/settings/_index.scss +3 -14
  137. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +0 -9
  138. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +12 -189
  139. data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +0 -1
  140. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +4 -2
  141. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +2 -0
  142. data/package-lock.json +2461 -1150
  143. data/package.json +3 -3
  144. metadata +16 -30
  145. data/node_modules/govuk-frontend/dist/govuk/all.scss +0 -9
  146. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.ico +0 -0
  147. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.svg +0 -1
  148. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-crest.svg +0 -1
  149. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-180.png +0 -0
  150. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-192.png +0 -0
  151. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-512.png +0 -0
  152. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-mask.svg +0 -1
  153. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-opengraph-image.png +0 -0
  154. data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/manifest.json +0 -39
  155. data/node_modules/govuk-frontend/dist/govuk/components/_all.scss +0 -10
  156. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +0 -233
  157. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +0 -225
  158. data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +0 -89
  159. data/node_modules/govuk-frontend/dist/govuk/core/_all.scss +0 -10
  160. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +0 -15
  161. data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss +0 -10
  162. data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss +0 -10
  163. data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss +0 -9
  164. data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss +0 -10
  165. data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss +0 -10
  166. data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss +0 -65
  167. data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss +0 -10
  168. data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss +0 -349
  169. data/node_modules/govuk-frontend/dist/govuk-prototype-kit/functions.js +0 -25
@@ -0,0 +1,366 @@
1
+ ////
2
+ /// @group settings/colours
3
+ ////
4
+
5
+ @import "../helpers/colour";
6
+
7
+ /// Default definitions of the functional colours
8
+ ///
9
+ /// @type Map
10
+ ///
11
+ /// @see {variable} $govuk-functional-colours
12
+ ///
13
+ /// @access public
14
+ $govuk-default-functional-colours: (
15
+ (
16
+ "brand": (
17
+ name: "blue"
18
+ ),
19
+ "text": (
20
+ name: "black"
21
+ ),
22
+ // The background colour of the template. This is intended to be the same
23
+ // as `surface-background` for the purposes of making the Footer and Cookie
24
+ // banner components merge seamlessly with the template.
25
+ "template-background": (
26
+ name: "blue",
27
+ variant: "tint-95"
28
+ ),
29
+ "body-background": (
30
+ name: "white"
31
+ ),
32
+ // Use 'true black' to avoid printers using colour ink to print body text
33
+ "print-text": #000000,
34
+ // Used in for example 'muted' text and help text.
35
+ "secondary-text": (
36
+ name: "black",
37
+ variant: "tint-25"
38
+ ),
39
+ // Used for outline (and background, where appropriate) when interactive
40
+ // elements (links, form controls) have keyboard focus.
41
+ "focus": (
42
+ name: "yellow"
43
+ ),
44
+ // Ensure that the contrast between the text and background colour passes
45
+ // WCAG Level AA contrast requirements.
46
+ "focus-text": (
47
+ name: "black"
48
+ ),
49
+ // Used to highlight error messages and form controls in an error state
50
+ "error": (
51
+ name: "red"
52
+ ),
53
+ // Used to highlight success messages and banners
54
+ "success": (
55
+ name: "green"
56
+ ),
57
+ // Used in for example borders, separators, rules and keylines.
58
+ "border": (
59
+ name: "black",
60
+ variant: "tint-80"
61
+ ),
62
+ // Used for form inputs and controls
63
+ "input-border": (
64
+ name: "black"
65
+ ),
66
+ // Used for hover states on form controls
67
+ "hover": (
68
+ name: "black",
69
+ variant: "tint-80"
70
+ ),
71
+ // Standard links (on white)
72
+ "link": (
73
+ name: "blue",
74
+ variant: "shade-10"
75
+ ),
76
+ "link-visited": (
77
+ name: "purple"
78
+ ),
79
+ "link-hover": (
80
+ name: "blue",
81
+ variant: "shade-50"
82
+ ),
83
+ "link-active": (
84
+ name: "black"
85
+ ),
86
+ // 'Surfaces' are our name for components that have different colour
87
+ // palettes to typical page content. This is the generic surface.
88
+ "surface-background": (
89
+ name: "blue",
90
+ variant: "tint-95"
91
+ ),
92
+ "surface-text": (
93
+ name: "black"
94
+ ),
95
+ "surface-border": (
96
+ name: "blue",
97
+ variant: "tint-50"
98
+ )
99
+ )
100
+ );
101
+
102
+ /// Functional colours for the GOV.UK palette.
103
+ ///
104
+ /// Each functional colour is represented by a name (for example `'brand'`) to
105
+ /// which the map associates either:
106
+ ///
107
+ /// - a Sass colour (like `#1d70b8`)
108
+ /// - a Sass map with a `name` and an optional `variant` properties, referring
109
+ /// to one of the colours in the colour palette (like `(name: 'blue',
110
+ /// variant: 'primary')`). `variant` defaults to `'primary'` if omitted.
111
+ ///
112
+ /// Use the `govuk-functional-colour` function to access these colours.
113
+ ///
114
+ /// Customise functional colours by defining $govuk-functional-colours with a
115
+ /// map of the colours that you want to change before importing GOV.UK Frontend.
116
+ /// These will then be merged with the default colours. You can only redefine
117
+ /// existing colours.
118
+ ///
119
+ /// @example scss – Redefining functional colours by setting them before import
120
+ ///
121
+ /// // These will be merged with the default functional colours
122
+ /// $govuk-functional-colours: (
123
+ /// // set the 'brand' colour to the 'primary' variant of 'purple'
124
+ /// brand: (name: 'purple'),
125
+ /// // set the 'template-background' colour to the 'tint-95' variant of 'purple'
126
+ /// template-background: (name: 'purple', variant: 'tint-95'),
127
+ /// // set the 'text' colour to an arbitrary colour `#221133`
128
+ /// text: #221133
129
+ /// );
130
+ ///
131
+ /// @see {function} govuk-functional-colour
132
+ ///
133
+ /// @type Map
134
+ ///
135
+ /// @access public
136
+ $govuk-functional-colours: $govuk-default-functional-colours !default;
137
+ $govuk-functional-colours: _govuk-define-functional-colours(
138
+ $govuk-functional-colours,
139
+ $defaults: $govuk-default-functional-colours
140
+ );
141
+
142
+ // =============================================================================
143
+ // Legacy variables
144
+ //
145
+ // To help migrate to `govuk-functional-colour`, we're keeping the variables
146
+ // which were previously storing the functional colours. This should reduce
147
+ // breakage as teams upgrade
148
+ // =============================================================================
149
+
150
+ // Because the file may be imported multiple times, subsequent imports will see
151
+ // the legacy variable and warn when they shouldn't so we need to track those
152
+ $_govuk-deprecated-applied-colour-variables: () !default;
153
+
154
+ /// Warn if a given legacy applied colour variable is set
155
+ ///
156
+ /// @param {String} Name of variable to check
157
+ /// @access private
158
+ @mixin _warn-if-applied-colour-variable-set($functional-colour-name) {
159
+ @if not index($_govuk-deprecated-applied-colour-variables, $functional-colour-name) {
160
+ @if variable-exists("govuk-#{$functional-colour-name}-colour") {
161
+ $deprecation-message: "Setting \`$govuk-#{$functional-colour-name}-colour\` no longer has any effect. Use \`$govuk-functional-colours: (#{$functional-colour-name}: <NEW_COLOUR_VALUE>);\` instead.";
162
+
163
+ @include _warning("applied-colour-variables", $deprecation-message);
164
+ }
165
+
166
+ $_govuk-deprecated-applied-colour-variables: append(
167
+ $_govuk-deprecated-applied-colour-variables,
168
+ $functional-colour-name
169
+ ) !global;
170
+ }
171
+ }
172
+
173
+ @include _warn-if-applied-colour-variable-set(brand);
174
+ /// Brand colour
175
+ ///
176
+ /// @type Colour
177
+ /// @access public
178
+ /// @deprecated
179
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
180
+ /// function instead: `govuk-functional-colour(brand)`.
181
+ $govuk-brand-colour: govuk-functional-colour(brand);
182
+
183
+ @include _warn-if-applied-colour-variable-set(text);
184
+ /// Text colour
185
+ ///
186
+ /// @type Colour
187
+ /// @access public
188
+ /// @deprecated
189
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
190
+ /// function instead: `govuk-functional-colour(text)`.
191
+ $govuk-text-colour: govuk-functional-colour(text);
192
+
193
+ @include _warn-if-applied-colour-variable-set(template-background);
194
+ /// Template background colour
195
+ ///
196
+ /// Used by components that want to give the illusion of extending
197
+ /// the template background (such as the footer and cookie banner).
198
+ ///
199
+ /// @type Colour
200
+ /// @access public
201
+ /// @deprecated
202
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
203
+ /// function instead: `govuk-functional-colour(template-background)`.
204
+ $govuk-template-background-colour: govuk-functional-colour(template-background);
205
+
206
+ @include _warn-if-applied-colour-variable-set(body-background);
207
+ /// Body background colour
208
+ ///
209
+ /// @type Colour
210
+ /// @access public
211
+ /// @deprecated
212
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
213
+ /// function instead: `govuk-functional-colour(body-background)`.
214
+ $govuk-body-background-colour: govuk-functional-colour(body-background);
215
+
216
+ @include _warn-if-applied-colour-variable-set(print-text);
217
+ /// Text colour for print media
218
+ ///
219
+ /// Use 'true black' to avoid printers using colour ink to print body text
220
+ ///
221
+ /// @type Colour
222
+ /// @access public
223
+ /// @deprecated
224
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
225
+ /// function instead: `govuk-functional-colour(print-text)`.
226
+ $govuk-print-text-colour: govuk-functional-colour(print-text);
227
+
228
+ @include _warn-if-applied-colour-variable-set(secondary-text);
229
+ /// Secondary text colour
230
+ ///
231
+ /// Used in for example 'muted' text and help text.
232
+ ///
233
+ /// @type Colour
234
+ /// @access public
235
+ /// @deprecated
236
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
237
+ /// function instead: `govuk-functional-colour(secondary-text)`.
238
+ $govuk-secondary-text-colour: govuk-functional-colour(secondary-text);
239
+
240
+ @include _warn-if-applied-colour-variable-set(focus);
241
+ /// Focus colour
242
+ ///
243
+ /// Used for outline (and background, where appropriate) when interactive
244
+ /// elements (links, form controls) have keyboard focus.
245
+ ///
246
+ /// @type Colour
247
+ /// @access public
248
+ /// @deprecated
249
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
250
+ /// function instead: `govuk-functional-colour(focus)`.
251
+ $govuk-focus-colour: govuk-functional-colour(focus);
252
+
253
+ @include _warn-if-applied-colour-variable-set(focus-text);
254
+ /// Focused text colour
255
+ ///
256
+ /// Ensure that the contrast between the text and background colour passes
257
+ /// WCAG Level AA contrast requirements.
258
+ ///
259
+ /// @type Colour
260
+ /// @access public
261
+ /// @deprecated
262
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
263
+ /// function instead: `govuk-functional-colour(focus-text)`.
264
+ $govuk-focus-text-colour: govuk-functional-colour(focus-text);
265
+
266
+ @include _warn-if-applied-colour-variable-set(error);
267
+ /// Error colour
268
+ ///
269
+ /// Used to highlight error messages and form controls in an error state
270
+ ///
271
+ /// @type Colour
272
+ /// @access public
273
+ /// @deprecated
274
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
275
+ /// function instead: `govuk-functional-colour(error)`.
276
+ $govuk-error-colour: govuk-functional-colour(error);
277
+
278
+ @include _warn-if-applied-colour-variable-set(success);
279
+ /// Success colour
280
+ ///
281
+ /// Used to highlight success messages and banners
282
+ ///
283
+ /// @type Colour
284
+ /// @access public
285
+ /// @deprecated
286
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
287
+ /// function instead: `govuk-functional-colour(error)`.
288
+ $govuk-success-colour: govuk-functional-colour(success);
289
+
290
+ @include _warn-if-applied-colour-variable-set(border);
291
+ /// Border colour
292
+ ///
293
+ /// Used in for example borders, separators, rules and keylines.
294
+ ///
295
+ /// @type Colour
296
+ /// @access public
297
+ /// @deprecated
298
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
299
+ /// function instead: `govuk-functional-colour(border)`.
300
+ $govuk-border-colour: govuk-functional-colour(border);
301
+
302
+ @include _warn-if-applied-colour-variable-set(input-border);
303
+ /// Input border colour
304
+ ///
305
+ /// Used for form inputs and controls
306
+ ///
307
+ /// @type Colour
308
+ /// @access public
309
+ /// @deprecated
310
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
311
+ /// function instead: `govuk-functional-colour(input-border)`.
312
+ $govuk-input-border-colour: govuk-functional-colour(input-border);
313
+
314
+ @include _warn-if-applied-colour-variable-set(hover);
315
+ /// Input hover colour
316
+ ///
317
+ /// Used for hover states on form controls
318
+ ///
319
+ /// @type Colour
320
+ /// @access public
321
+ /// @deprecated
322
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
323
+ /// function instead: `govuk-functional-colour(hover)`.
324
+ $govuk-hover-colour: govuk-functional-colour(hover);
325
+
326
+ @include _warn-if-applied-colour-variable-set(link);
327
+ /// Link colour
328
+ ///
329
+ /// @type Colour
330
+ /// @access public
331
+ /// @deprecated
332
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
333
+ /// function instead: `govuk-functional-colour(link)`.
334
+ $govuk-link-colour: govuk-functional-colour(link);
335
+
336
+ @include _warn-if-applied-colour-variable-set(link-visited);
337
+ /// Visited link colour
338
+ ///
339
+ /// @type Colour
340
+ /// @access public
341
+ /// @deprecated
342
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
343
+ /// function instead: `govuk-functional-colour(link-visited)`.
344
+ $govuk-link-visited-colour: govuk-functional-colour(link-visited);
345
+
346
+ @include _warn-if-applied-colour-variable-set(link-hover);
347
+ /// Link hover colour
348
+ ///
349
+ /// @type Colour
350
+ /// @access public
351
+ /// @deprecated
352
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
353
+ /// function instead: `govuk-functional-colour(link-hover)`.
354
+ $govuk-link-hover-colour: govuk-functional-colour(link-hover);
355
+
356
+ @include _warn-if-applied-colour-variable-set(link-active);
357
+ /// Active link colour
358
+ ///
359
+ /// @type Colour
360
+ /// @access public
361
+ /// @deprecated
362
+ /// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`
363
+ /// function instead: `govuk-functional-colour(link-active)`.
364
+ $govuk-link-active-colour: govuk-functional-colour(link-active);
365
+
366
+ /*# sourceMappingURL=_colours-functional.scss.map */
@@ -4,20 +4,7 @@
4
4
  /// @group settings/colours
5
5
  ////
6
6
 
7
- /// Feature flag for updated organisation list and colours
8
- ///
9
- /// When set to true, $govuk-colours-organisations will use the new
10
- /// organisation list and colour selection.
11
- ///
12
- /// Should be removed in 6.0.
13
- ///
14
- /// @type Boolean
15
- /// @access public
16
- /// @deprecated Using new organisation colours will become the default in Frontend v6.0.
17
-
18
- $govuk-new-organisation-colours: false !default;
19
-
20
- /// Current organisation colours
7
+ /// Organisation colour palette
21
8
  ///
22
9
  /// @type Map
23
10
  ///
@@ -27,12 +14,12 @@ $govuk-new-organisation-colours: false !default;
27
14
  /// white, to be used for copy and meet the AAA (large text) and AA (smaller
28
15
  /// copy) WCAG guidelines.
29
16
  /// @prop $organisation.deprecation-message - Marks this organisation as
30
- /// deprecated (usually because it has ceased to exist). Value is the
31
- /// deprecation message output to the terminal when compiling.
17
+ /// deprecated (usually because it has ceased to exist). The value is the
18
+ /// deprecation message output to the terminal when compiling Sass.
32
19
  ///
33
- /// @access private
20
+ /// @access public
34
21
 
35
- $_govuk-organisation-colours: (
22
+ $govuk-colours-organisations: (
36
23
  "attorney-generals-office": (
37
24
  colour: #a91c8e
38
25
  ),
@@ -46,61 +33,20 @@ $_govuk-organisation-colours: (
46
33
  colour: #e52d13,
47
34
  contrast-safe: #e02c13
48
35
  ),
49
- "department-for-business-energy-industrial-strategy": (
50
- colour: #003479,
51
- deprecation-message:
52
- "`department-for-business-energy-industrial-strategy` was dissolved in 2023. It was replaced by `department-for-business-trade`, `department-for-energy-security-net-zero` and `department-science-innovation-technology`."
53
- ),
54
- "department-for-business-innovation-skills": (
55
- colour: #003479,
56
- deprecation-message:
57
- "`department-for-business-innovation-skills` became `department-for-business-energy-industrial-strategy` in 2016. As of 2023, it is equivalent to `department-for-business-trade` or `department-science-innovation-technology`."
58
- ),
59
- "department-for-communities-local-government": (
60
- colour: #009999,
61
- contrast-safe: #008080,
62
- deprecation-message:
63
- "`department-for-communities-local-government` became `ministry-of-housing-communities-local-government` in 2018."
64
- ),
65
36
  "department-for-culture-media-sport": (
66
37
  colour: #ed1588,
67
38
  contrast-safe: #d6177a
68
39
  ),
69
- "department-for-digital-culture-media-sport": (
70
- colour: #d40072,
71
- deprecation-message:
72
- "`department-for-digital-culture-media-sport` became `department-for-culture-media-sport` in 2023."
73
- ),
74
40
  "department-for-education": (
75
41
  colour: #003764
76
42
  ),
77
43
  "department-for-energy-security-net-zero": (
78
- colour: #00a33b,
79
- contrast-safe: #00852f
44
+ colour: #003479
80
45
  ),
81
46
  "department-for-environment-food-rural-affairs": (
82
47
  colour: #00a33b,
83
48
  contrast-safe: #008531
84
49
  ),
85
- "department-for-exiting-the-european-union": (
86
- colour: #009fe3,
87
- contrast-safe: #007db6,
88
- deprecation-message: "`department-for-exiting-the-european-union` was dissolved in 2020."
89
- ),
90
- "department-for-international-development": (
91
- colour: #002878,
92
- deprecation-message:
93
- "`department-for-international-development` was merged into `foreign-commonwealth-development-office` in 2020."
94
- ),
95
- "department-for-international-trade": (
96
- colour: #cf102d,
97
- deprecation-message: "`department-for-international-trade` was merged into `department-for-business-trade` in 2023."
98
- ),
99
- "department-for-levelling-up-housing-communities": (
100
- colour: #012169,
101
- deprecation-message:
102
- "`department-for-levelling-up-housing-communities` was renamed to `ministry-of-housing-communities-local-government` in 2024."
103
- ),
104
50
  "department-for-science-innovation-technology": (
105
51
  colour: #00f8f8,
106
52
  contrast-safe: #008180
@@ -112,37 +58,18 @@ $_govuk-organisation-colours: (
112
58
  colour: #00bcb5,
113
59
  contrast-safe: #00857e
114
60
  ),
115
- "department-of-energy-climate-change": (
116
- colour: #009ddb,
117
- contrast-safe: #007db3,
118
- deprecation-message:
119
- "`department-of-energy-climate-change` was merged into `department-for-business-energy-industrial-strategy` in 2016. As of 2023, it is equivalent to `department-for-energy-security-net-zero`."
120
- ),
121
- "department-of-health": (
122
- colour: #00ad93,
123
- contrast-safe: #008573,
124
- deprecation-message: "`department-of-health` became `department-of-health-social-care` in 2018."
125
- ),
126
61
  "department-of-health-social-care": (
127
62
  colour: #00a990,
128
63
  contrast-safe: #008674
129
64
  ),
130
- "foreign-commonwealth-office": (
131
- colour: #003e74,
132
- deprecation-message: "`foreign-commonwealth-office` became `foreign-commonwealth-development-office` in 2018."
133
- ),
134
65
  "foreign-commonwealth-development-office": (
135
66
  colour: #012069
136
67
  ),
137
- "government-equalities-office": (
138
- colour: #0056b8,
139
- deprecation-message: "`government-equalities-office` is deprecated. Use `cabinet-office` instead."
140
- ),
141
68
  "hm-government": (
142
69
  colour: #266ebc
143
70
  ),
144
71
  "hm-revenue-customs": (
145
- colour: #008476
72
+ colour: #008670
146
73
  ),
147
74
  "hm-treasury": (
148
75
  colour: #b2292e
@@ -171,14 +98,6 @@ $_govuk-organisation-colours: (
171
98
  "office-of-the-leader-of-the-house-of-lords": (
172
99
  colour: #9c182f
173
100
  ),
174
- "office-of-the-secretary-of-state-for-scotland": (
175
- colour: #00205c,
176
- deprecation-message: "`office-of-the-secretary-of-state-for-scotland` was renamed to `scotland-office` in 2024."
177
- ),
178
- "office-of-the-secretary-of-state-for-wales": (
179
- colour: #a8353a,
180
- deprecation-message: "`office-of-the-secretary-of-state-for-wales` was renamed to `wales-office` in 2024."
181
- ),
182
101
  "prime-ministers-office-10-downing-street": (
183
102
  colour: #0b0c0c
184
103
  ),
@@ -191,173 +110,10 @@ $_govuk-organisation-colours: (
191
110
  "uk-export-finance": (
192
111
  colour: #cf102d
193
112
  ),
194
- "uk-trade-investment": (
195
- colour: #c80651,
196
- deprecation-message:
197
- "`uk-trade-investment` became `department-for-international-trade` in 2016. As of 2023, it is equivalent to `department-for-business-trade`."
198
- ),
199
113
  "wales-office": (
200
114
  colour: #a33038
201
115
  )
202
- );
203
-
204
- /// Legacy organisation colours
205
- ///
206
- /// These are the colours included with Frontend prior to 5.3.0. They will be
207
- /// removed in a future major version of Frontend.
208
- ///
209
- /// @type Map
210
- ///
211
- /// @prop $organisation.colour - Colour for the given `$organisation`
212
- /// @prop $organisation.colour-websafe - Optional alternative shade of the
213
- /// organisation colour. Despite the name, is not guaranteed to be websafe
214
- /// nor provide better contrast than the base colour.
215
- ///
216
- /// @access private
217
- /// @deprecated Migrate to using the new organisation colour palette instead.
218
-
219
- $_govuk-legacy-organisation-colours: (
220
- "attorney-generals-office": (
221
- colour: #9f1888,
222
- colour-websafe: #a03a88
223
- ),
224
- "cabinet-office": (
225
- colour: #005abb,
226
- colour-websafe: #347da4
227
- ),
228
- "civil-service": (
229
- colour: #af292e
230
- ),
231
- "department-for-business-innovation-skills": (
232
- colour: #003479,
233
- colour-websafe: #347da4
234
- ),
235
- "department-for-communities-local-government": (
236
- colour: #009999,
237
- colour-websafe: #37836e
238
- ),
239
- "department-for-culture-media-sport": (
240
- colour: #d40072,
241
- colour-websafe: #a03155
242
- ),
243
- "department-for-education": (
244
- colour: #003a69,
245
- colour-websafe: #347ca9
246
- ),
247
- "department-for-environment-food-rural-affairs": (
248
- colour: #00a33b,
249
- colour-websafe: #008938
250
- ),
251
- "department-for-international-development": (
252
- colour: #002878,
253
- colour-websafe: #405e9a
254
- ),
255
- "department-for-international-trade": (
256
- colour: #cf102d,
257
- colour-websafe: #005ea5
258
- ),
259
- "department-for-business-trade": (
260
- colour: #cf102d,
261
- colour-websafe: #005ea5
262
- ),
263
- "department-for-levelling-up-housing-communities": (
264
- colour: #012169
265
- ),
266
- "department-for-transport": (
267
- colour: #006c56,
268
- colour-websafe: #398373
269
- ),
270
- "department-for-work-pensions": (
271
- colour: #00beb7,
272
- colour-websafe: #37807b
273
- ),
274
- "department-of-energy-climate-change": (
275
- colour: #009ddb,
276
- colour-websafe: #2b7cac
277
- ),
278
- "department-of-health": (
279
- colour: #00ad93,
280
- colour-websafe: #39836e
281
- ),
282
- "foreign-commonwealth-development-office": (
283
- colour: #012169
284
- ),
285
- "foreign-commonwealth-office": (
286
- colour: #003e74,
287
- colour-websafe: #406e97
288
- ),
289
- "government-equalities-office": (
290
- colour: #9325b2
291
- ),
292
- "hm-government": (
293
- colour: #0076c0,
294
- colour-websafe: #347da4
295
- ),
296
- "hm-revenue-customs": (
297
- colour: #009390,
298
- colour-websafe: #008670
299
- ),
300
- "hm-treasury": (
301
- colour: #af292e,
302
- colour-websafe: #832322
303
- ),
304
- "home-office": (
305
- colour: #9325b2,
306
- colour-websafe: #9440b2
307
- ),
308
- "ministry-of-defence": (
309
- colour: #4d2942,
310
- colour-websafe: #5a5c92
311
- ),
312
- "ministry-of-justice": (
313
- colour: #231f20,
314
- colour-websafe: #5a5c92
315
- ),
316
- "northern-ireland-office": (
317
- colour: #002663,
318
- colour-websafe: #3e598c
319
- ),
320
- "office-of-the-advocate-general-for-scotland": (
321
- colour: #002663,
322
- colour-websafe: #005ea5
323
- ),
324
- "office-of-the-leader-of-the-house-of-commons": (
325
- colour: #317023,
326
- colour-websafe: #005f8f
327
- ),
328
- "office-of-the-leader-of-the-house-of-lords": (
329
- colour: #9c132e,
330
- colour-websafe: #c2395d
331
- ),
332
- "scotland-office": (
333
- colour: #002663,
334
- colour-websafe: #405c8a
335
- ),
336
- "uk-export-finance": (
337
- colour: #005747,
338
- colour-websafe: #005ea5
339
- ),
340
- "uk-trade-investment": (
341
- colour: #c80651,
342
- colour-websafe: #005ea5
343
- ),
344
- "wales-office": (
345
- colour: #a33038,
346
- colour-websafe: #7a242a
347
- )
348
- );
349
-
350
- /// Set public organisation colours variable to one of the two maps.
351
- /// Users can also pass their own map to this to override it entirely.
352
- ///
353
- /// @type Map
354
- /// @access public
355
-
356
- $govuk-colours-organisations: $_govuk-legacy-organisation-colours !default;
357
-
358
- @if $govuk-new-organisation-colours and $govuk-colours-organisations == $_govuk-legacy-organisation-colours {
359
- $govuk-colours-organisations: $_govuk-organisation-colours;
360
- }
116
+ ) !default;
361
117
 
362
118
  /// Organisation colour aliases
363
119
  ///
@@ -374,9 +130,7 @@ $govuk-colours-organisations: $_govuk-legacy-organisation-colours !default;
374
130
  /// @access private
375
131
 
376
132
  $_govuk-colours-organisations-aliases: (
377
- "department-for-business-and-trade": "department-for-business-trade",
378
- "department-for-communities-and-local-government": "department-for-communities-local-government",
379
- "department-for-levelling-up-housing-and-communities": "department-for-levelling-up-housing-communities"
133
+ "department-for-business-and-trade": "department-for-business-trade"
380
134
  );
381
135
 
382
136
  /*# sourceMappingURL=_colours-organisations.scss.map */