govuk_tech_docs 6.3.0 → 6.4.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build-middleman-artifact.yaml +3 -3
  3. data/.github/workflows/check-documentation-updates.yaml +32 -0
  4. data/.github/workflows/check-gem-version.yaml +36 -0
  5. data/.github/workflows/dependency-review.yaml +2 -5
  6. data/.github/workflows/pipeline.yaml +50 -0
  7. data/.github/workflows/publish-gem.yaml +61 -0
  8. data/.github/workflows/{deploy-to-pages.yaml → publish-github-pages.yaml} +3 -4
  9. data/.github/workflows/test.yaml +9 -8
  10. data/.rspec +1 -0
  11. data/CHANGELOG.md +8 -0
  12. data/README.md +1 -1
  13. data/lib/govuk_tech_docs/version.rb +1 -1
  14. data/lib/source/layouts/_footer.erb +1 -1
  15. data/lib/source/layouts/_header.erb +1 -1
  16. data/lib/source/layouts/_service_navigation.erb +3 -1
  17. data/lib/source/layouts/core.erb +2 -4
  18. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +2 -5
  19. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +2 -5
  20. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  21. data/node_modules/govuk-frontend/dist/govuk/components/_index.import.scss +1 -0
  22. data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +1 -0
  23. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_mixin.scss +1 -5
  24. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_mixin.scss +7 -1
  25. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_mixin.scss +5 -1
  26. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +1 -4
  27. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +1 -4
  28. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +1 -5
  29. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_generic-header.import.scss +6 -0
  30. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_index.import.scss +8 -0
  31. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_index.scss +5 -0
  32. data/node_modules/govuk-frontend/dist/govuk/components/generic-header/_mixin.scss +140 -0
  33. data/node_modules/govuk-frontend/dist/govuk/components/header/_mixin.scss +9 -65
  34. data/node_modules/govuk-frontend/dist/govuk/components/input/_mixin.scss +1 -0
  35. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_mixin.scss +8 -7
  36. data/node_modules/govuk-frontend/dist/govuk/components/panel/_mixin.scss +46 -12
  37. data/node_modules/govuk-frontend/dist/govuk/components/radios/_mixin.scss +7 -1
  38. data/node_modules/govuk-frontend/dist/govuk/components/select/_mixin.scss +0 -7
  39. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +8 -7
  40. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +1 -1
  41. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  42. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +1 -1
  43. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +3 -0
  44. data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss +1 -1
  45. data/package-lock.json +160 -559
  46. data/package.json +3 -3
  47. metadata +10 -3
  48. data/.github/workflows/publish.yaml +0 -83
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e14e31166315775ce210071e6369ceed8e305111f6667a75e9dfb56216879616
4
- data.tar.gz: 79b82c15e10ac592f12fa635db39838d0676cb86abcc2a33e654ed22cbe2cd7c
3
+ metadata.gz: 4bdc6cdd2fc1c883f3d0e5a3c25b3fce362207729376181436ce17d19ecf8bf0
4
+ data.tar.gz: 1eced113c1c927f274f513a2a84edfa5bc590e445845cf9b55af852d7ebe7fad
5
5
  SHA512:
6
- metadata.gz: 8fea921277de197457d49755c9c7ddee7cf60cfcff80e599304824a47b6f094e58947a7673f849719b00a730a7d2a6b4c9e5933b5c70b5d0d9b627d797c30cf2
7
- data.tar.gz: 2009a67d569ae66cfeda08739e7223a74da595bdba126a9bb0f440bb5c5704ec90e8285ea543a4943ea794350b7fdffafb0e230f2aa308d8c71d9db1ed24fc3b
6
+ metadata.gz: bead1914b3ad00993bcf519a1931d70463e5a22c5f3c5665355ac39e24610b027ba54dc729f47142568af2ccfc5d3192c631e56adcedaa7c14f240a8eb3eb8f8
7
+ data.tar.gz: cabbdfc6bb527131c71a52be3bde21545967cb6afaa3797e35612c2fcf0a513268594d9cf0a773fa2dc735082d95390546c1374634745d850e7242765f30cd42
@@ -15,15 +15,15 @@ jobs:
15
15
  working-directory: documentation
16
16
  steps:
17
17
  - name: Checkout repository
18
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
18
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19
19
  with:
20
20
  fetch-depth: 0
21
21
  - name: Setup Node
22
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
22
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
23
23
  with:
24
24
  node-version-file: 'documentation/.nvmrc'
25
25
  - name: Setup Ruby
26
- uses: ruby/setup-ruby@89f90524b88a01fe6e0b732220432cc6142926af # v1.313.0
26
+ uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
27
27
  with:
28
28
  bundler-cache: true
29
29
  working-directory: documentation
@@ -0,0 +1,32 @@
1
+ name: check-documentation-updates
2
+
3
+ on:
4
+ workflow_call:
5
+ outputs:
6
+ documentation-updated:
7
+ value: ${{ jobs.check-documentation-updates.outputs.documentation-updated }}
8
+
9
+
10
+ jobs:
11
+ check-documentation-updates:
12
+ runs-on: ubuntu-latest
13
+ outputs:
14
+ documentation-updated: ${{ steps.documentation_updated.outputs.documentation-updated }}
15
+
16
+ steps:
17
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
18
+ with:
19
+ show-progress: false
20
+
21
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
22
+ with:
23
+ ruby-version: '3'
24
+
25
+ - name: Documentation updated
26
+ id: documentation_updated
27
+ run: |
28
+ if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^documentation/'; then
29
+ echo "documentation-updated=true" >> $GITHUB_OUTPUT
30
+ else
31
+ echo "documentation-updated=false" >> $GITHUB_OUTPUT
32
+ fi
@@ -0,0 +1,36 @@
1
+ name: check-gem-version
2
+ on:
3
+ workflow_call:
4
+ outputs:
5
+ version-changed:
6
+ value: ${{ jobs.check-gem-version.outputs.version-changed }}
7
+
8
+
9
+ jobs:
10
+ check-gem-version:
11
+ runs-on: ubuntu-latest
12
+ outputs:
13
+ version-changed: ${{ steps.gem_version.outputs.version-changed }}
14
+
15
+ steps:
16
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
17
+ with:
18
+ show-progress: false
19
+
20
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
21
+ with:
22
+ ruby-version: '3'
23
+
24
+ - name: Gem version changed
25
+ id: gem_version
26
+ run: |
27
+ gem_version=$(ruby -r rubygems -e "puts Gem::Specification::load('govuk_tech_docs.gemspec').version")
28
+ echo "gem_version=$gem_version" >> "$GITHUB_OUTPUT"
29
+
30
+ if git fetch origin "refs/tags/v$gem_version" >/dev/null 2>&1
31
+ then
32
+ echo "Tag 'v$gem_version' already exists"
33
+ echo "version-changed=false" >> "$GITHUB_OUTPUT"
34
+ else
35
+ echo "version-changed=true" >> "$GITHUB_OUTPUT"
36
+ fi
@@ -1,9 +1,6 @@
1
1
  name: 'Dependency Review'
2
2
  on:
3
- pull_request:
4
- branches: [ "main" ]
5
- push:
6
- branches: [ "main" ]
3
+ workflow_call:
7
4
 
8
5
  permissions:
9
6
  contents: read
@@ -13,7 +10,7 @@ jobs:
13
10
  runs-on: ubuntu-latest
14
11
  steps:
15
12
  - name: 'Checkout Repository'
16
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
13
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
17
14
  - name: 'Dependency Review'
18
15
  uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 #5.0.0
19
16
  with:
@@ -0,0 +1,50 @@
1
+ name: pipeline
2
+ on:
3
+ pull_request:
4
+ branches: [ "main"]
5
+ push:
6
+ branches: [ "main"]
7
+
8
+ jobs:
9
+ dependency-review:
10
+ uses: ./.github/workflows/dependency-review.yaml
11
+ permissions:
12
+ contents: read
13
+
14
+ test:
15
+ needs: dependency-review
16
+ uses: ./.github/workflows/test.yaml
17
+ permissions:
18
+ contents: read # Allows the action to check out your repository code
19
+ pull-requests: write # Allows the action to comment on or update the Dependabot PR
20
+ statuses: write # Allows the action to post pass/fail build statuses
21
+
22
+ check-gem-version:
23
+ needs: test
24
+ uses: ./.github/workflows/check-gem-version.yaml
25
+
26
+ publish-gem:
27
+ needs: check-gem-version
28
+ if: github.event_name == 'push' && needs.check-gem-version.outputs.version-changed == 'true'
29
+ with:
30
+ new-gem-version: true
31
+ uses: ./.github/workflows/publish-gem.yaml
32
+ permissions:
33
+ contents: write # needed to be able to tag the release
34
+
35
+ check-documentation-updates:
36
+ needs: publish-gem
37
+ if: |
38
+ github.event_name == 'push' &&
39
+ always() &&
40
+ (needs.publish-gem.result == 'success' || needs.publish-gem.result == 'skipped')
41
+ uses: ./.github/workflows/check-documentation-updates.yaml
42
+
43
+ publish-github-pages:
44
+ needs: check-documentation-updates
45
+ if: github.event_name == 'push' && needs.check-documentation-updates.outputs.documentation-updated == 'true'
46
+ uses: ./.github/workflows/publish-github-pages.yaml
47
+ permissions:
48
+ contents: read
49
+ pages: write
50
+ id-token: write
@@ -0,0 +1,61 @@
1
+ name: Publish
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ new-gem-version:
7
+ default: false
8
+ type: boolean
9
+
10
+ workflow_dispatch:
11
+ inputs:
12
+ new-gem-version:
13
+ description: 'Force publish gem?'
14
+ default: false
15
+ type: boolean
16
+
17
+ concurrency: rubygems
18
+
19
+ jobs:
20
+ deploy:
21
+ name: Publish Ruby Gem
22
+ environment: rubygems
23
+ permissions:
24
+ contents: write # needed to be able to tag the release
25
+ runs-on: ubuntu-latest
26
+ if: inputs.new-gem-version
27
+
28
+ steps:
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ with:
31
+ show-progress: false
32
+
33
+ - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
34
+ with:
35
+ node-version-file: '.nvmrc'
36
+ cache: 'npm'
37
+
38
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
39
+ with:
40
+ ruby-version: '3'
41
+ bundler-cache: true
42
+
43
+ - name: Publish
44
+ env:
45
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
46
+ run: |
47
+ mkdir -p ~/.gem
48
+
49
+ cat << EOF > ~/.gem/credentials
50
+ ---
51
+ :rubygems_api_key: ${RUBYGEMS_API_KEY}
52
+ EOF
53
+
54
+ chmod 0600 ~/.gem/credentials
55
+
56
+ # tag will be associated with github-actions bot user, see
57
+ # https://github.community/t/github-actions-bot-email-address/17204
58
+ git config user.name "github-actions[bot]"
59
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
60
+
61
+ bundle exec rake release
@@ -1,8 +1,7 @@
1
- name: 'Deploy to GitHub Pages'
1
+ name: Publish GitHub pages
2
2
  on:
3
- push:
4
- branches: ["main", "feature/publish-documentation"]
5
- paths: ['documentation/**']
3
+ workflow_call:
4
+
6
5
 
7
6
  permissions:
8
7
  contents: read
@@ -1,37 +1,38 @@
1
1
  name: Test
2
2
 
3
3
  on:
4
- pull_request:
5
- branches: [ "main" ]
6
- push:
7
- branches: [ "main" ]
8
- workflow_dispatch:
4
+ workflow_call:
9
5
 
10
6
  permissions:
11
7
  contents: read # Allows the action to check out your repository code
12
8
  pull-requests: write # Allows the action to comment on or update the Dependabot PR
13
9
  statuses: write # Allows the action to post pass/fail build statuses
14
10
 
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
15
  jobs:
16
16
  test:
17
17
  name: Test
18
18
  runs-on: ubuntu-latest
19
19
 
20
20
  strategy:
21
+ fail-fast: false
21
22
  matrix:
22
23
  ruby: ['3.3', '3.4', '4.0']
23
24
 
24
25
  steps:
25
- - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
26
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26
27
  with:
27
28
  show-progress: false
28
29
 
29
- - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
30
+ - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
30
31
  with:
31
32
  node-version-file: '.nvmrc'
32
33
  cache: 'npm'
33
34
 
34
- - uses: ruby/setup-ruby@89f90524b88a01fe6e0b732220432cc6142926af # v1.313.0
35
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
35
36
  with:
36
37
  ruby-version: ${{ matrix.ruby }}
37
38
  bundler-cache: true
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --color
2
2
  --require spec_helper
3
+ --format documentation
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## Unreleased changes
2
+
3
+ ## 6.3.1.beta
4
+
5
+ - [Remove govuk wrapper class](https://github.com/alphagov/tech-docs-gem/pull/530) that introduced extra padding
6
+ - Update[ template html syntax](https://github.com/alphagov/tech-docs-gem/pull/520) to more closely match gov.uk design template
7
+ - bump govuk-frontend from [6.2.0 to 6.3.0](https://github.com/alphagov/tech-docs-gem/pull/517)
8
+
1
9
  ## 6.3.0
2
10
 
3
11
  - Bugfix [issue 258](https://github.com/alphagov/tech-docs-template/issues/258) - page layout structure to remove whitespace on short pages ([pull request 513](https://github.com/alphagov/tech-docs-gem/pull/513))
data/README.md CHANGED
@@ -163,7 +163,7 @@ the [Tech Docs template documentation on previewing your documentation](https://
163
163
  You can run the Ruby test suite with the following command:
164
164
 
165
165
  ```shell
166
- bundle exec rspec
166
+ bundle exec rake spec
167
167
  ```
168
168
 
169
169
  To test a specific file include the filepath after `rspec`.
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "6.3.0".freeze
2
+ VERSION = "6.4.0.beta".freeze
3
3
  end
@@ -1,4 +1,4 @@
1
- <div class="govuk-footer app-footer" role="contentinfo">
1
+ <div class="govuk-footer app-footer">
2
2
  <% if config[:tech_docs][:show_govuk_logo] %>
3
3
  <svg focusable="false" role="presentation" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 60" height="30" width="32" fill="currentcolor" class="govuk-footer__crown">
4
4
  <g>
@@ -1,4 +1,4 @@
1
- <div class="govuk-header app-header" role="banner" data-module="govuk-header">
1
+ <div class="govuk-header app-header">
2
2
  <div class="govuk-header__container govuk-header__container--full-width">
3
3
  <div class="govuk-header__logo">
4
4
  <% if config[:tech_docs][:service_link] %>
@@ -1,4 +1,5 @@
1
- <div class="govuk-width-container">
1
+ <div class="govuk-service-navigation app-pane__navigation" data-module="govuk-service-navigation">
2
+ <div class="govuk-width-container">
2
3
  <div class="govuk-service-navigation__container">
3
4
  <nav aria-label="Menu" class="govuk-service-navigation__wrapper">
4
5
  <button type="button" class="govuk-service-navigation__toggle govuk-js-service-navigation-toggle" aria-controls="navigation" hidden aria-hidden="true">
@@ -20,3 +21,4 @@
20
21
  </nav>
21
22
  </div>
22
23
  </div>
24
+ </div>
@@ -50,13 +50,11 @@
50
50
 
51
51
  <body class="govuk-template__body">
52
52
  <script>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');</script>
53
- <header class="govuk-template__header app-header" role="banner" data-module="govuk-header">
53
+ <header class="govuk-template__header app-header">
54
54
  <%= partial 'layouts/header' %>
55
55
  </header>
56
56
  <% if config[:tech_docs][:header_links] %>
57
- <div class="govuk-service-navigation app-pane__navigation" data-module="govuk-service-navigation">
58
57
  <%= partial 'layouts/service_navigation' %>
59
- </div>
60
58
  <% end %>
61
59
 
62
60
 
@@ -87,7 +85,7 @@
87
85
  <% end %>
88
86
 
89
87
  <div class="app-pane__content toc-open-disabled" aria-label="Content">
90
- <main id="content" class="govuk-main-wrapper technical-documentation"<% if config[:tech_docs][:enable_anchored_headings] != false %> data-module="anchored-headings"<% end %>>
88
+ <main id="content" class="technical-documentation"<% if config[:tech_docs][:enable_anchored_headings] != false %> data-module="anchored-headings"<% end %>>
91
89
  <%= yield %>
92
90
  <%= partial "layouts/page_review" %>
93
91
  </main>
@@ -4,7 +4,7 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.GOVUKFrontend = global.GOVUKFrontend || {}));
5
5
  })(this, (function (exports) { 'use strict';
6
6
 
7
- const version = '6.2.0';
7
+ const version = '6.4.0';
8
8
 
9
9
  function getBreakpoint(name) {
10
10
  const property = `--govuk-breakpoint-${name}`;
@@ -1594,16 +1594,13 @@
1594
1594
  this.id = void 0;
1595
1595
  this.$announcements = void 0;
1596
1596
  this.enteredAnotherElement = void 0;
1597
- const $input = this.$root.querySelector('input');
1597
+ const $input = this.$root.querySelector('input[type="file"]');
1598
1598
  if ($input === null) {
1599
1599
  throw new ElementError({
1600
1600
  component: FileUpload,
1601
1601
  identifier: 'File inputs (`<input type="file">`)'
1602
1602
  });
1603
1603
  }
1604
- if ($input.type !== 'file') {
1605
- throw new ElementError(formatErrorMessage(FileUpload, 'File input (`<input type="file">`) attribute (`type`) is not `file`'));
1606
- }
1607
1604
  this.$input = $input;
1608
1605
  if (!this.$input.id) {
1609
1606
  throw new ElementError({
@@ -1,4 +1,4 @@
1
- const version = '6.2.0';
1
+ const version = '6.4.0';
2
2
 
3
3
  function getBreakpoint(name) {
4
4
  const property = `--govuk-breakpoint-${name}`;
@@ -1588,16 +1588,13 @@ class FileUpload extends ConfigurableComponent {
1588
1588
  this.id = void 0;
1589
1589
  this.$announcements = void 0;
1590
1590
  this.enteredAnotherElement = void 0;
1591
- const $input = this.$root.querySelector('input');
1591
+ const $input = this.$root.querySelector('input[type="file"]');
1592
1592
  if ($input === null) {
1593
1593
  throw new ElementError({
1594
1594
  component: FileUpload,
1595
1595
  identifier: 'File inputs (`<input type="file">`)'
1596
1596
  });
1597
1597
  }
1598
- if ($input.type !== 'file') {
1599
- throw new ElementError(formatErrorMessage(FileUpload, 'File input (`<input type="file">`) attribute (`type`) is not `file`'));
1600
- }
1601
1598
  this.$input = $input;
1602
1599
  if (!this.$input.id) {
1603
1600
  throw new ElementError({
@@ -1,4 +1,4 @@
1
- const version = '6.2.0';
1
+ const version = '6.4.0';
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=govuk-frontend-version.mjs.map
@@ -13,6 +13,7 @@
13
13
  @import "fieldset";
14
14
  @import "file-upload";
15
15
  @import "footer";
16
+ @import "generic-header";
16
17
  @import "header";
17
18
  @import "hint";
18
19
  @import "input";
@@ -13,6 +13,7 @@
13
13
  @use "fieldset";
14
14
  @use "file-upload";
15
15
  @use "footer";
16
+ @use "generic-header";
16
17
  @use "header";
17
18
  @use "hint";
18
19
  @use "input";
@@ -124,11 +124,7 @@
124
124
  }
125
125
 
126
126
  .govuk-breadcrumbs--inverse {
127
- color: base.govuk-colour("white");
128
-
129
- .govuk-breadcrumbs__link {
130
- @include base.govuk-link-style-inverse;
131
- }
127
+ --govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
132
128
 
133
129
  .govuk-breadcrumbs__list-item::before {
134
130
  border-color: currentcolor;
@@ -41,7 +41,7 @@
41
41
  // __item using flex-wrap because we want hints on a separate line.
42
42
  max-width: calc(100% - #{(($govuk-checkboxes-label-padding-left-right * 2) + $govuk-touch-target-size)});
43
43
  margin-bottom: 0;
44
- padding: (base.govuk-spacing(1) + base.$govuk-border-width-form-element) base.govuk-spacing(3);
44
+ padding: (base.govuk-spacing(1) + base.$govuk-border-width-form-element) $govuk-checkboxes-label-padding-left-right;
45
45
  cursor: pointer;
46
46
  // remove 300ms pause on mobile
47
47
  touch-action: manipulation;
@@ -206,6 +206,12 @@
206
206
  }
207
207
 
208
208
  .govuk-checkboxes__label {
209
+ // Recalculate max-width to account for the smaller checkbox size
210
+ // 1px comes from padding-left (defined below)
211
+ max-width: calc(
212
+ 100% - #{($govuk-touch-target-size - $input-offset) + $govuk-checkboxes-label-padding-left-right + 1px}
213
+ );
214
+
209
215
  // Create a tiny space between the small checkbox hover state so that it
210
216
  // doesn't clash with the label
211
217
  padding-left: 1px;
@@ -69,7 +69,11 @@
69
69
  right: 0;
70
70
  bottom: 0;
71
71
  left: 0;
72
- background-color: base.govuk-colour("white");
72
+ // The overlay is imitating a default browser window so we can use
73
+ // system colours ensure it matches the browser's default colours.
74
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/system-color
75
+ color: CanvasText;
76
+ background-color: Canvas;
73
77
  }
74
78
 
75
79
  // This class is added to the body when the Exit This Page button is activated
@@ -387,16 +387,13 @@
387
387
  this.id = void 0;
388
388
  this.$announcements = void 0;
389
389
  this.enteredAnotherElement = void 0;
390
- const $input = this.$root.querySelector('input');
390
+ const $input = this.$root.querySelector('input[type="file"]');
391
391
  if ($input === null) {
392
392
  throw new ElementError({
393
393
  component: FileUpload,
394
394
  identifier: 'File inputs (`<input type="file">`)'
395
395
  });
396
396
  }
397
- if ($input.type !== 'file') {
398
- throw new ElementError(formatErrorMessage(FileUpload, 'File input (`<input type="file">`) attribute (`type`) is not `file`'));
399
- }
400
397
  this.$input = $input;
401
398
  if (!this.$input.id) {
402
399
  throw new ElementError({
@@ -381,16 +381,13 @@ class FileUpload extends ConfigurableComponent {
381
381
  this.id = void 0;
382
382
  this.$announcements = void 0;
383
383
  this.enteredAnotherElement = void 0;
384
- const $input = this.$root.querySelector('input');
384
+ const $input = this.$root.querySelector('input[type="file"]');
385
385
  if ($input === null) {
386
386
  throw new ElementError({
387
387
  component: FileUpload,
388
388
  identifier: 'File inputs (`<input type="file">`)'
389
389
  });
390
390
  }
391
- if ($input.type !== 'file') {
392
- throw new ElementError(formatErrorMessage(FileUpload, 'File input (`<input type="file">`) attribute (`type`) is not `file`'));
393
- }
394
391
  this.$input = $input;
395
392
  if (!this.$input.id) {
396
393
  throw new ElementError({
@@ -1,6 +1,5 @@
1
1
  import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';
2
2
  import { ConfigurableComponent } from '../../common/configuration.mjs';
3
- import { formatErrorMessage } from '../../common/index.mjs';
4
3
  import { ElementError } from '../../errors/index.mjs';
5
4
  import { I18n } from '../../i18n.mjs';
6
5
 
@@ -25,16 +24,13 @@ class FileUpload extends ConfigurableComponent {
25
24
  this.id = void 0;
26
25
  this.$announcements = void 0;
27
26
  this.enteredAnotherElement = void 0;
28
- const $input = this.$root.querySelector('input');
27
+ const $input = this.$root.querySelector('input[type="file"]');
29
28
  if ($input === null) {
30
29
  throw new ElementError({
31
30
  component: FileUpload,
32
31
  identifier: 'File inputs (`<input type="file">`)'
33
32
  });
34
33
  }
35
- if ($input.type !== 'file') {
36
- throw new ElementError(formatErrorMessage(FileUpload, 'File input (`<input type="file">`) attribute (`type`) is not `file`'));
37
- }
38
34
  this.$input = $input;
39
35
  if (!this.$input.id) {
40
36
  throw new ElementError({
@@ -0,0 +1,6 @@
1
+ @use "../../settings/warnings--internal";
2
+
3
+ @include warnings--internal.component-scss-file-warning("generic-header");
4
+
5
+ @import "index";
6
+
@@ -0,0 +1,8 @@
1
+ @use "mixin";
2
+
3
+ @import "../../base";
4
+
5
+ @include govuk-exports("govuk/component/generic-header") {
6
+ @include mixin.styles;
7
+ }
8
+
@@ -0,0 +1,5 @@
1
+ @use "../../custom-properties";
2
+ @use "mixin";
3
+
4
+ @include mixin.styles;
5
+