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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +61 -40
- data/lib/dxw_govuk_frontend_rails/version.rb +1 -1
- data/package-lock.json +22 -4
- data/package.json +1 -1
- data/vendor/assets/javascripts/govuk_frontend_rails.js +119 -4
- data/vendor/assets/stylesheets/components/_all.scss +2 -0
- data/vendor/assets/stylesheets/components/accordion/_index.scss +7 -16
- data/vendor/assets/stylesheets/components/back-link/_index.scss +4 -15
- data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +1 -0
- data/vendor/assets/stylesheets/components/button/_index.scss +15 -8
- data/vendor/assets/stylesheets/components/character-count/_index.scss +1 -0
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +63 -34
- data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +51 -0
- data/vendor/assets/stylesheets/components/details/_index.scss +7 -2
- data/vendor/assets/stylesheets/components/error-summary/_index.scss +2 -12
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +14 -14
- data/vendor/assets/stylesheets/components/footer/_index.scss +39 -29
- data/vendor/assets/stylesheets/components/header/_index.scss +44 -22
- data/vendor/assets/stylesheets/components/input/_index.scss +4 -0
- data/vendor/assets/stylesheets/components/notification-banner/_index.scss +89 -0
- data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/phase-banner/_index.scss +1 -1
- data/vendor/assets/stylesheets/components/radios/_index.scss +14 -0
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +3 -1
- data/vendor/assets/stylesheets/components/table/_index.scss +21 -0
- data/vendor/assets/stylesheets/components/tabs/_index.scss +1 -6
- data/vendor/assets/stylesheets/components/warning-text/_index.scss +10 -1
- data/vendor/assets/stylesheets/core/_links.scss +8 -0
- data/vendor/assets/stylesheets/core/_template.scss +0 -1
- data/vendor/assets/stylesheets/helpers/_colour.scss +2 -2
- data/vendor/assets/stylesheets/helpers/_links.scss +245 -30
- data/vendor/assets/stylesheets/objects/_all.scss +1 -0
- data/vendor/assets/stylesheets/objects/_button-group.scss +101 -0
- data/vendor/assets/stylesheets/objects/_width-container.scss +4 -0
- data/vendor/assets/stylesheets/settings/_all.scss +2 -0
- data/vendor/assets/stylesheets/settings/_colours-applied.scss +9 -0
- data/vendor/assets/stylesheets/settings/_links.scss +62 -0
- data/vendor/assets/stylesheets/settings/_typography-font.scss +3 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d13df6b5f41f50ed1be07dbd4e157072e6cdc64537df5d5fb2f807ca846a59bc
|
4
|
+
data.tar.gz: 79da91fc77c60ed37047d26a770491aa83a717a619ae2e0e45373c5fe3472061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 555d823ff0083d5603ba327eaf385579658a75c2596ce0d734cf649483d210661e5fe4dca8677e0cc220fb578e0761c75c95ff5f7c002c61c59e3a6466c17cc8
|
7
|
+
data.tar.gz: 85551726cc81c6721b9588796611e5bca8b573c32a88df7adcff020cbdb7279567a86e403fe4a5a6ab346971358cb7749ec23e14bb5f32b45e213bbec90e7061
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,91 +1,112 @@
|
|
1
|
-
#
|
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
|
6
|
-
|
7
|
-
|
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
|
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
|
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
|
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
|
26
|
-
standard no longer requires
|
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
|
31
|
-
see the
|
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
|
-
|
37
|
+
## Installation
|
34
38
|
|
35
39
|
Add this line to your application's Gemfile:
|
36
40
|
|
37
|
-
```ruby
|
41
|
+
```ruby
|
42
|
+
gem 'dxw_govuk_frontend_rails'
|
43
|
+
```
|
38
44
|
|
39
45
|
And then execute:
|
40
46
|
|
41
|
-
|
47
|
+
```
|
48
|
+
$ bundle
|
49
|
+
```
|
50
|
+
|
51
|
+
## Usage
|
42
52
|
|
43
|
-
|
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
|
48
|
-
Frontend all you need to do is import the main
|
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
|
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
|
-
|
68
|
+
`app/assets/stylesheets/govuk_frontend_rails.scss`
|
59
69
|
|
60
|
-
-
|
70
|
+
- import the styles into `govuk_frontend_rails.scss`:
|
61
71
|
|
62
|
-
|
63
|
-
|
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
|
-
|
67
|
-
- update your application markup to use the GOVUK Frontend class names
|
87
|
+
`window.onload = function() { window.GOVUKFrontend.initAll() };`
|
68
88
|
|
69
|
-
|
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
|
-
|
91
|
+
## Tracking GOV.UK Frontend versions
|
73
92
|
|
74
|
-
|
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
|
97
|
+
## Updating to a new version of GOV.UK Frontend
|
77
98
|
|
78
|
-
When a new version of the
|
99
|
+
When a new version of the GOV.UK Frontend is released:
|
79
100
|
|
80
|
-
- make a new branch with the
|
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
|
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
|
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
|
112
|
+
- GitHub actions will build the gem and push to RubyGems
|
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":
|
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
|
-
"resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.
|
10
|
-
"integrity": "sha512-
|
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
@@ -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
|
-
//
|
1766
|
-
|
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 (
|
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:
|
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;
|
@@ -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
|
-
-
|
262
|
-
flex-
|
263
|
-
|
264
|
-
|
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 {
|