dxw_govuk_frontend_rails 3.9.1 → 3.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +61 -40
  4. data/lib/dxw_govuk_frontend_rails/version.rb +1 -1
  5. data/package-lock.json +22 -4
  6. data/package.json +1 -1
  7. data/vendor/assets/javascripts/govuk_frontend_rails.js +119 -4
  8. data/vendor/assets/stylesheets/components/_all.scss +2 -0
  9. data/vendor/assets/stylesheets/components/accordion/_index.scss +7 -16
  10. data/vendor/assets/stylesheets/components/back-link/_index.scss +4 -15
  11. data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +1 -0
  12. data/vendor/assets/stylesheets/components/button/_index.scss +15 -8
  13. data/vendor/assets/stylesheets/components/character-count/_index.scss +1 -0
  14. data/vendor/assets/stylesheets/components/checkboxes/_index.scss +63 -34
  15. data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.scss +2 -0
  16. data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +51 -0
  17. data/vendor/assets/stylesheets/components/details/_index.scss +7 -2
  18. data/vendor/assets/stylesheets/components/error-summary/_index.scss +2 -12
  19. data/vendor/assets/stylesheets/components/file-upload/_index.scss +14 -14
  20. data/vendor/assets/stylesheets/components/footer/_index.scss +39 -29
  21. data/vendor/assets/stylesheets/components/header/_index.scss +44 -22
  22. data/vendor/assets/stylesheets/components/input/_index.scss +4 -0
  23. data/vendor/assets/stylesheets/components/notification-banner/_index.scss +89 -0
  24. data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +2 -0
  25. data/vendor/assets/stylesheets/components/phase-banner/_index.scss +1 -1
  26. data/vendor/assets/stylesheets/components/radios/_index.scss +14 -0
  27. data/vendor/assets/stylesheets/components/skip-link/_index.scss +3 -1
  28. data/vendor/assets/stylesheets/components/table/_index.scss +21 -0
  29. data/vendor/assets/stylesheets/components/tabs/_index.scss +1 -6
  30. data/vendor/assets/stylesheets/components/warning-text/_index.scss +10 -1
  31. data/vendor/assets/stylesheets/core/_links.scss +8 -0
  32. data/vendor/assets/stylesheets/core/_template.scss +0 -1
  33. data/vendor/assets/stylesheets/helpers/_colour.scss +2 -2
  34. data/vendor/assets/stylesheets/helpers/_links.scss +245 -30
  35. data/vendor/assets/stylesheets/objects/_all.scss +1 -0
  36. data/vendor/assets/stylesheets/objects/_button-group.scss +101 -0
  37. data/vendor/assets/stylesheets/objects/_width-container.scss +4 -0
  38. data/vendor/assets/stylesheets/settings/_all.scss +2 -0
  39. data/vendor/assets/stylesheets/settings/_colours-applied.scss +9 -0
  40. data/vendor/assets/stylesheets/settings/_links.scss +62 -0
  41. data/vendor/assets/stylesheets/settings/_typography-font.scss +3 -0
  42. metadata +9 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32963462555eea031d11a2c85e7d59aff6534434c5430e522a1468c591d1aa8d
4
- data.tar.gz: 636e39bce62acc9c6106a2f2156865d26f53bda67e68c7d50e3e5352f0e3bfae
3
+ metadata.gz: d13df6b5f41f50ed1be07dbd4e157072e6cdc64537df5d5fb2f807ca846a59bc
4
+ data.tar.gz: 79da91fc77c60ed37047d26a770491aa83a717a619ae2e0e45373c5fe3472061
5
5
  SHA512:
6
- metadata.gz: 4e5169826e7097a3939119f86b73050355f2330f2e3befa2c9146273a51f01a9ee40d521626f6a372d001590e55e26cafeb2ea8c9c1fd787ff5078c0b52b5725
7
- data.tar.gz: 3fec0b62d356b58d8cf364d3ebd9d618c092e352fc8cbb6813d047413579a8ec08f36471b46506c6c38c3642d4988dd65b3548c2ec2f0eccd03f045381e65f51
6
+ metadata.gz: 555d823ff0083d5603ba327eaf385579658a75c2596ce0d734cf649483d210661e5fe4dca8677e0cc220fb578e0761c75c95ff5f7c002c61c59e3a6466c17cc8
7
+ data.tar.gz: 85551726cc81c6721b9588796611e5bca8b573c32a88df7adcff020cbdb7279567a86e403fe4a5a6ab346971358cb7749ec23e14bb5f32b45e213bbec90e7061
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dxw_govuk_frontend_rails (3.9.1)
4
+ dxw_govuk_frontend_rails (3.13.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -18,4 +18,4 @@ DEPENDENCIES
18
18
  rake (~> 13.0)
19
19
 
20
20
  BUNDLED WITH
21
- 2.2.1
21
+ 2.2.24
data/README.md CHANGED
@@ -1,91 +1,112 @@
1
- # GOVUK Frontend for Rails
1
+ # GOV.UK Frontend for Rails
2
2
 
3
3
  ## Read this first
4
4
 
5
- Although this gem makes it super easy to add the GOVUK Frontend to your
6
- Rails applications, we would recommend using it as a guide to add the
7
- GOVUK Frontend yourself.
5
+ Although this gem makes it super easy to add the GOV.UK Frontend to your Rails
6
+ applications, we would recommend using it as a guide to add the GOV.UK Frontend
7
+ yourself.
8
8
 
9
- ## About Adds the GOVUK Frontend for Rails using the asset pipeline.
9
+ ## About
10
+
11
+ Adds the GOV.UK Frontend for Rails using the asset pipeline.
10
12
 
11
13
  https://github.com/alphagov/govuk-frontend
12
14
 
13
15
  ## Breaking Changes in v3.0.0
14
16
 
15
- This release of the GOVUK Frontend has breaking changes! Do not update to this
17
+ This release of the GOV.UK Frontend has breaking changes! Do not update to this
16
18
  version until you have read and understood:
17
19
 
18
- You will not be required to updated any file paths with govuk as we take care of
19
- that for you, all others changes will need to be managed:
20
+ You will not be required to updated any file paths with `govuk` as we take care
21
+ of that for you, all others changes will need to be managed:
20
22
 
21
23
  https://github.com/alphagov/govuk-frontend/releases/tag/v3.0.0
22
24
 
23
25
  ## Limitations
24
26
 
25
- This gem does not include the ie8 version of GOVUK Frontend, as the service
26
- standard no longer requires it:
27
+ This gem does not include the `ie8` version of GOV.UK Frontend, as the service
28
+ standard no longer requires support for Internet Explorer versions less than 11:
27
29
 
28
30
  https://www.gov.uk/service-manual/technology/designing-for-different-browsers-and-devices
29
31
 
30
- This gem and its documentation cannot tell you how to use the GOVUK effectively,
31
- see the GOVUK Design System documentation for that:
32
+ This gem and its documentation cannot tell you how to use the GOV.UK patterns
33
+ effectively, see the GOV.UK Design System documentation for that:
34
+
35
+ https://design-system.service.gov.uk/
32
36
 
33
- https://design-system.service.gov.uk/ ## Installation
37
+ ## Installation
34
38
 
35
39
  Add this line to your application's Gemfile:
36
40
 
37
- ```ruby gem 'dxw_govuk_frontend_rails' ```
41
+ ```ruby
42
+ gem 'dxw_govuk_frontend_rails'
43
+ ```
38
44
 
39
45
  And then execute:
40
46
 
41
- $ bundle
47
+ ```
48
+ $ bundle
49
+ ```
50
+
51
+ ## Usage
42
52
 
43
- ## Usage Your Rails app will need to have sass enabled.
53
+ Your Rails app will need to have SCSS enabled.
54
+
55
+ **IMPORTANT: You must not use this library without changes if the service you
56
+ are building is not on GOV.UK. Read and understand the guidance here:**
57
+
58
+ https://www.gov.uk/service-manual/design/making-your-service-look-like-govuk#if-your-service-isnt-on-govuk
44
59
 
45
60
  ### Basic usage
46
61
 
47
- If the service you are building does not need to modify or extend the GOVUK
48
- Frontend all you need to do is import the main sass and javascript files into
62
+ If the service you are building does not need to modify or extend the GOV.UK
63
+ Frontend, all you need to do is import the main SCSS and JavaScript files into
49
64
  your Rails app:
50
65
 
51
- - create a sass file in your application: ```
52
- app/assets/stylesheets/govuk_frontend_rails.scss ```
53
- - import the styles into `govuk_frontend_rails.scss`: ```sass @import
54
- "govuk-frontend-rails"; ```
55
- - require the `govuk-frontend-rails.scss` file in `application.css` or
56
- equivalent:
66
+ - create a SCSS file in your application:
57
67
 
58
- ``` *= require govuk_frontend_rails ```
68
+ `app/assets/stylesheets/govuk_frontend_rails.scss`
59
69
 
60
- - require the javascript into `app/assets/javascripts/application.js`:
70
+ - import the styles into `govuk_frontend_rails.scss`:
61
71
 
62
- ``` //= require govuk_frontend_rails ```
63
- - initialise the GOVUK Frontend either in a .js file on in your application
72
+ `@import "govuk-frontend-rails";`
73
+
74
+ - import the `govuk-frontend-rails.scss` file in the comment block in
75
+ `app/assets/stylesheets/application.css` or equivalent:
76
+
77
+ `*= require govuk_frontend_rails`
78
+
79
+ - import the JavaScript in the comment block of
80
+ `app/assets/javascripts/application.js`:
81
+
82
+ `//= require govuk_frontend_rails`
83
+
84
+ - initialise the GOV.UK Frontend either in a .js file or in your application
64
85
  layout:
65
86
 
66
- ```javascript window.onload = function() { window.GOVUKFrontend.initAll() }; ```
67
- - update your application markup to use the GOVUK Frontend class names
87
+ `window.onload = function() { window.GOVUKFrontend.initAll() };`
68
88
 
69
- IMPORTANT: You cannot use the GOVUK Frontend without changes if the service you
70
- are building is not on GOV.UK, read and understand the guidance here:
89
+ - update your application markup to use the GOV.UK Frontend class names
71
90
 
72
- https://www.gov.uk/service-manual/design/making-your-service-look-like-govuk#if-your-service-isnt-on-govuk
91
+ ## Tracking GOV.UK Frontend versions
73
92
 
74
- ## Tracking version We aim to tracking the version of GOVUK Frontend.
93
+ We aim to track the latest version of GOV.UK Frontend but we may fall behind.
94
+ Opening an issue if we are behind on a new release would be helpful, or open a
95
+ PR to update to the latest release!
75
96
 
76
- ## Updating to a new Version of GOVUK Frontend
97
+ ## Updating to a new version of GOV.UK Frontend
77
98
 
78
- When a new version of the GOVUK Frontend is released:
99
+ When a new version of the GOV.UK Frontend is released:
79
100
 
80
- - make a new branch with the GOVUK Frontend version number
101
+ - make a new branch with the GOV.UK Frontend version number
81
102
  - set the new version number in `package.json` and
82
103
  `lib/dxw_govuk_frontend_rails/version.rb`
83
- - run `npm update` to get the new release of the GOVUK Frontend
104
+ - run `npm update` to get the new release of the GOV.UK Frontend
84
105
  - run `bundle exec rake` to compile the new assets
85
106
  - commit the changes
86
- - tag with the same release number as GOVUK Frontend
107
+ - tag with the same release number as GOV.UK Frontend
87
108
  - push the change
88
109
  - push the tag
89
110
  - merge your branch
90
111
  - make a new release of the tag on GitHub
91
- - GitHub acitons will build the gem and push to Rubygems
112
+ - GitHub actions will build the gem and push to RubyGems
@@ -1,3 +1,3 @@
1
1
  module DxwGovukFrontendRails
2
- VERSION = "3.9.1"
2
+ VERSION = "3.13.1"
3
3
  end
data/package-lock.json CHANGED
@@ -1,13 +1,31 @@
1
1
  {
2
2
  "name": "dxw_govuk_frontend_rails",
3
3
  "version": "1.0.0",
4
- "lockfileVersion": 1,
4
+ "lockfileVersion": 2,
5
5
  "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "dxw_govuk_frontend_rails",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "govuk-frontend": "3.13.1"
13
+ }
14
+ },
15
+ "node_modules/govuk-frontend": {
16
+ "version": "3.13.1",
17
+ "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.13.1.tgz",
18
+ "integrity": "sha512-OlbAVVpJfZ8tEhkScVoNFA+27RUfMDslN4uxtJyASfXwg4QZYHTX8RqmKBbgVJWaybpa5RsYDuRKQNJe3qN8gw==",
19
+ "engines": {
20
+ "node": ">= 4.2.0"
21
+ }
22
+ }
23
+ },
6
24
  "dependencies": {
7
25
  "govuk-frontend": {
8
- "version": "3.9.1",
9
- "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.9.1.tgz",
10
- "integrity": "sha512-ouOoDUj0QwDA4uCHIBkGCFMpORuTRcSuDscOrz7V1PBcOecntLglxJAZAuNm+j2sPo7anoScHU0ZSeE2QIoeAg=="
26
+ "version": "3.13.1",
27
+ "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.13.1.tgz",
28
+ "integrity": "sha512-OlbAVVpJfZ8tEhkScVoNFA+27RUfMDslN4uxtJyASfXwg4QZYHTX8RqmKBbgVJWaybpa5RsYDuRKQNJe3qN8gw=="
11
29
  }
12
30
  }
13
31
  }
data/package.json CHANGED
@@ -21,6 +21,6 @@
21
21
  },
22
22
  "homepage": "https://github.com/mec/dxw_govuk_frontend_rails#readme",
23
23
  "dependencies": {
24
- "govuk-frontend": "3.9.1"
24
+ "govuk-frontend": "3.13.1"
25
25
  }
26
26
  }
@@ -1498,7 +1498,7 @@ function CharacterCount ($module) {
1498
1498
  this.$module = $module;
1499
1499
  this.$textarea = $module.querySelector('.govuk-js-character-count');
1500
1500
  if (this.$textarea) {
1501
- this.$countMessage = $module.querySelector('[id=' + this.$textarea.id + '-info]');
1501
+ this.$countMessage = $module.querySelector('[id="' + this.$textarea.id + '-info"]');
1502
1502
  }
1503
1503
  }
1504
1504
 
@@ -1751,6 +1751,47 @@ Checkboxes.prototype.syncConditionalRevealWithInputState = function ($input) {
1751
1751
  }
1752
1752
  };
1753
1753
 
1754
+ /**
1755
+ * Uncheck other checkboxes
1756
+ *
1757
+ * Find any other checkbox inputs with the same name value, and uncheck them.
1758
+ * This is useful for when a “None of these" checkbox is checked.
1759
+ */
1760
+ Checkboxes.prototype.unCheckAllInputsExcept = function ($input) {
1761
+ var allInputsWithSameName = document.querySelectorAll('input[type="checkbox"][name="' + $input.name + '"]');
1762
+
1763
+ nodeListForEach(allInputsWithSameName, function ($inputWithSameName) {
1764
+ var hasSameFormOwner = ($input.form === $inputWithSameName.form);
1765
+ if (hasSameFormOwner && $inputWithSameName !== $input) {
1766
+ $inputWithSameName.checked = false;
1767
+ }
1768
+ });
1769
+
1770
+ this.syncAllConditionalReveals();
1771
+ };
1772
+
1773
+ /**
1774
+ * Uncheck exclusive inputs
1775
+ *
1776
+ * Find any checkbox inputs with the same name value and the 'exclusive' behaviour,
1777
+ * and uncheck them. This helps prevent someone checking both a regular checkbox and a
1778
+ * "None of these" checkbox in the same fieldset.
1779
+ */
1780
+ Checkboxes.prototype.unCheckExclusiveInputs = function ($input) {
1781
+ var allInputsWithSameNameAndExclusiveBehaviour = document.querySelectorAll(
1782
+ 'input[data-behaviour="exclusive"][type="checkbox"][name="' + $input.name + '"]'
1783
+ );
1784
+
1785
+ nodeListForEach(allInputsWithSameNameAndExclusiveBehaviour, function ($exclusiveInput) {
1786
+ var hasSameFormOwner = ($input.form === $exclusiveInput.form);
1787
+ if (hasSameFormOwner) {
1788
+ $exclusiveInput.checked = false;
1789
+ }
1790
+ });
1791
+
1792
+ this.syncAllConditionalReveals();
1793
+ };
1794
+
1754
1795
  /**
1755
1796
  * Click event handler
1756
1797
  *
@@ -1762,12 +1803,29 @@ Checkboxes.prototype.syncConditionalRevealWithInputState = function ($input) {
1762
1803
  Checkboxes.prototype.handleClick = function (event) {
1763
1804
  var $target = event.target;
1764
1805
 
1765
- // If a checkbox with aria-controls, handle click
1766
- var isCheckbox = $target.getAttribute('type') === 'checkbox';
1806
+ // Ignore clicks on things that aren't checkbox inputs
1807
+ if ($target.type !== 'checkbox') {
1808
+ return
1809
+ }
1810
+
1811
+ // If the checkbox conditionally-reveals some content, sync the state
1767
1812
  var hasAriaControls = $target.getAttribute('aria-controls');
1768
- if (isCheckbox && hasAriaControls) {
1813
+ if (hasAriaControls) {
1769
1814
  this.syncConditionalRevealWithInputState($target);
1770
1815
  }
1816
+
1817
+ // No further behaviour needed for unchecking
1818
+ if (!$target.checked) {
1819
+ return
1820
+ }
1821
+
1822
+ // Handle 'exclusive' checkbox behaviour (ie "None of these")
1823
+ var hasBehaviourExclusive = ($target.getAttribute('data-behaviour') === 'exclusive');
1824
+ if (hasBehaviourExclusive) {
1825
+ this.unCheckAllInputsExcept($target);
1826
+ } else {
1827
+ this.unCheckExclusiveInputs($target);
1828
+ }
1771
1829
  };
1772
1830
 
1773
1831
  (function(undefined) {
@@ -1959,6 +2017,58 @@ ErrorSummary.prototype.getAssociatedLegendOrLabel = function ($input) {
1959
2017
  $input.closest('label')
1960
2018
  };
1961
2019
 
2020
+ function NotificationBanner ($module) {
2021
+ this.$module = $module;
2022
+ }
2023
+
2024
+ /**
2025
+ * Initialise the component
2026
+ */
2027
+ NotificationBanner.prototype.init = function () {
2028
+ var $module = this.$module;
2029
+ // Check for module
2030
+ if (!$module) {
2031
+ return
2032
+ }
2033
+
2034
+ this.setFocus();
2035
+ };
2036
+
2037
+ /**
2038
+ * Focus the element
2039
+ *
2040
+ * If `role="alert"` is set, focus the element to help some assistive technologies
2041
+ * prioritise announcing it.
2042
+ *
2043
+ * You can turn off the auto-focus functionality by setting `data-disable-auto-focus="true"` in the
2044
+ * component HTML. You might wish to do this based on user research findings, or to avoid a clash
2045
+ * with another element which should be focused when the page loads.
2046
+ */
2047
+ NotificationBanner.prototype.setFocus = function () {
2048
+ var $module = this.$module;
2049
+
2050
+ if ($module.getAttribute('data-disable-auto-focus') === 'true') {
2051
+ return
2052
+ }
2053
+
2054
+ if ($module.getAttribute('role') !== 'alert') {
2055
+ return
2056
+ }
2057
+
2058
+ // Set tabindex to -1 to make the element focusable with JavaScript.
2059
+ // Remove the tabindex on blur as the component doesn't need to be focusable after the page has
2060
+ // loaded.
2061
+ if (!$module.getAttribute('tabindex')) {
2062
+ $module.setAttribute('tabindex', '-1');
2063
+
2064
+ $module.addEventListener('blur', function () {
2065
+ $module.removeAttribute('tabindex');
2066
+ });
2067
+ }
2068
+
2069
+ $module.focus();
2070
+ };
2071
+
1962
2072
  function Header ($module) {
1963
2073
  this.$module = $module;
1964
2074
  this.$menuButton = $module && $module.querySelector('.govuk-js-header-toggle');
@@ -2476,6 +2586,11 @@ function initAll (options) {
2476
2586
  var $toggleButton = scope.querySelector('[data-module="govuk-header"]');
2477
2587
  new Header($toggleButton).init();
2478
2588
 
2589
+ var $notificationBanners = scope.querySelectorAll('[data-module="govuk-notification-banner"]');
2590
+ nodeListForEach($notificationBanners, function ($notificationBanner) {
2591
+ new NotificationBanner($notificationBanner).init();
2592
+ });
2593
+
2479
2594
  var $radios = scope.querySelectorAll('[data-module="govuk-radios"]');
2480
2595
  nodeListForEach($radios, function ($radio) {
2481
2596
  new Radios($radio).init();
@@ -6,6 +6,7 @@
6
6
  @import "button/index";
7
7
  @import "checkboxes/index";
8
8
  @import "character-count/index";
9
+ @import "cookie-banner/index";
9
10
  @import "summary-list/index";
10
11
  @import "date-input/index";
11
12
  @import "details/index";
@@ -19,6 +20,7 @@
19
20
  @import "input/index";
20
21
  @import "inset-text/index";
21
22
  @import "label/index";
23
+ @import "notification-banner/index";
22
24
  @import "panel/index";
23
25
  @import "phase-banner/index";
24
26
  @import "tabs/index";
@@ -1,9 +1,4 @@
1
1
  @include govuk-exports("govuk/component/accordion") {
2
-
3
- $govuk-accordion-link-colour: $govuk-link-colour;
4
- $govuk-accordion-link-hover-colour: govuk-colour("light-blue");
5
- $govuk-accordion-border-width: 3px;
6
-
7
2
  .govuk-accordion {
8
3
  @include govuk-responsive-margin(6, "bottom");
9
4
  }
@@ -98,19 +93,9 @@
98
93
  // Safe area on the right to avoid clashing with icon
99
94
  padding-right: 40px;
100
95
  border-top: 1px solid $govuk-border-colour;
101
- color: $govuk-accordion-link-colour;
102
96
  cursor: pointer;
103
97
  }
104
98
 
105
- // For devices that can't hover such as touch devices,
106
- // remove hover state as it can be stuck in that state (iOS).
107
- @media (hover: none) {
108
- .govuk-accordion__section-header:hover {
109
- border-top-color: $govuk-accordion-link-colour;
110
- box-shadow: inset 0 $govuk-accordion-border-width 0 0 $govuk-accordion-link-colour;
111
- }
112
- }
113
-
114
99
  // Buttons within the headers don’t need default styling
115
100
  .govuk-accordion__section-button {
116
101
  @include govuk-typography-common;
@@ -119,7 +104,7 @@
119
104
  margin-left: 0;
120
105
  padding: 0;
121
106
  border-width: 0;
122
- color: inherit;
107
+ color: $govuk-link-colour;
123
108
  background: none;
124
109
  text-align: left;
125
110
  cursor: pointer;
@@ -147,7 +132,13 @@
147
132
  }
148
133
 
149
134
  .govuk-accordion__section-button:hover:not(:focus) {
135
+ color: $govuk-link-hover-colour;
150
136
  text-decoration: underline;
137
+
138
+ // This needs to come after the text-decoration property otherwise
139
+ // text-decoration, as a shorthand property, resets it to auto
140
+ @include govuk-link-hover-decoration;
141
+ text-underline-offset: $govuk-link-underline-offset;
151
142
  }
152
143
 
153
144
  // For devices that can't hover such as touch devices,
@@ -24,21 +24,6 @@
24
24
  padding-left: 14px;
25
25
  }
26
26
 
27
- // Only underline if the component is linkable
28
- .govuk-back-link[href] {
29
- text-decoration: underline;
30
-
31
- // When the back link is focused, hide the bottom link border as the
32
- // focus styles has a bottom border.
33
- &:focus {
34
- text-decoration: none;
35
-
36
- &:before {
37
- border-color: $govuk-text-colour;
38
- }
39
- }
40
- }
41
-
42
27
  // Prepend left pointing chevron
43
28
  .govuk-back-link:before {
44
29
  content: "";
@@ -88,6 +73,10 @@
88
73
  }
89
74
  }
90
75
 
76
+ .govuk-back-link:focus:before {
77
+ border-color: $govuk-focus-text-colour;
78
+ }
79
+
91
80
  .govuk-back-link:after {
92
81
  content: "";
93
82
  position: absolute;
@@ -129,6 +129,7 @@
129
129
 
130
130
  .govuk-breadcrumbs__list {
131
131
  display: -webkit-box;
132
+ display: -webkit-flex;
132
133
  display: -ms-flexbox;
133
134
  display: flex;
134
135
  }
@@ -29,6 +29,8 @@
29
29
  position: relative;
30
30
  width: 100%;
31
31
  margin-top: 0;
32
+ margin-right: 0;
33
+ margin-left: 0;
32
34
  @include govuk-responsive-margin(6, "bottom", $adjustment: $button-shadow-size); // s2
33
35
  padding: (govuk-spacing(2) - $govuk-border-width-form-element) govuk-spacing(2) (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)); // s1
34
36
  border: $govuk-border-width-form-element solid transparent;
@@ -156,10 +158,6 @@
156
158
  cursor: default;
157
159
  }
158
160
 
159
- &:focus {
160
- outline: none;
161
- }
162
-
163
161
  &:active {
164
162
  top: 0;
165
163
  box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
@@ -239,6 +237,8 @@
239
237
 
240
238
  display: -webkit-inline-box;
241
239
 
240
+ display: -webkit-inline-flex;
241
+
242
242
  display: -ms-inline-flexbox;
243
243
 
244
244
  display: inline-flex;
@@ -246,6 +246,8 @@
246
246
 
247
247
  -webkit-box-pack: center;
248
248
 
249
+ -webkit-justify-content: center;
250
+
249
251
  -ms-flex-pack: center;
250
252
 
251
253
  justify-content: center;
@@ -258,10 +260,15 @@
258
260
  margin-left: govuk-spacing(2);
259
261
  }
260
262
  vertical-align: middle;
261
- -ms-flex-negative: 0;
262
- flex-shrink: 0;
263
- -ms-flex-item-align: center;
264
- align-self: center;
263
+ -webkit-flex-shrink: 0;
264
+ -ms-flex-negative: 0;
265
+ flex-shrink: 0;
266
+ -webkit-align-self: center;
267
+ -ms-flex-item-align: center;
268
+ align-self: center;
269
+ // Work around SVGs not inheriting color from parent in forced color mode
270
+ // (https://github.com/w3c/csswg-drafts/issues/6310)
271
+ forced-color-adjust: auto;
265
272
  }
266
273
 
267
274
  @if $govuk-use-legacy-font {
@@ -14,6 +14,7 @@
14
14
  }
15
15
 
16
16
  .govuk-character-count__message {
17
+ @include govuk-font($size: false, $tabular: true);
17
18
  margin-top: 0;
18
19
  margin-bottom: 0;
19
20
  }