katalyst-govuk-formbuilder 1.3.2 → 1.4.0
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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/katalyst/govuk/formbuilder.scss +1 -1
- data/lib/katalyst/govuk/formbuilder/engine.rb +1 -0
- data/lib/katalyst/govuk/formbuilder/version.rb +1 -1
- data/vendor/assets/stylesheets/govuk-frontend/govuk/_base.scss +3 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/all-ie8.scss +6 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/all.scss +9 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/_all.scss +34 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_index.scss +392 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_index.scss +147 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_button.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_index.scss +295 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_index.scss +34 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_index.scss +335 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_index.scss +49 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_details.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_index.scss +88 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_index.scss +12 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_index.scss +50 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_index.scss +200 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_header.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_index.scss +349 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_index.scss +42 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_index.scss +181 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_input.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_index.scss +41 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_label.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_index.scss +56 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_index.scss +349 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_index.scss +60 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_select.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_index.scss +47 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_index.scss +276 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_index.scss +71 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_table.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_index.scss +81 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_all.scss +5 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_global-styles.scss +19 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_links.scss +35 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_lists.scss +66 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_section-break.scss +56 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_typography.scss +186 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_all.scss +12 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_colour.scss +95 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss +33 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_grid.scss +61 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_links.scss +429 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_spacing.scss +171 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_typography.scss +214 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_all.scss +6 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_button-group.scss +85 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_form-group.scss +23 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_grid.scss +24 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_main-wrapper.scss +53 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_template.scss +32 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_width-container.scss +84 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_all.scss +5 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_display.scss +24 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_spacing.scss +102 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_text-align.scss +14 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_typography.scss +21 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_width.scss +46 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_all.scss +24 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_assets.scss +82 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-organisations.scss +142 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-palette.scss +120 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_compatibility.scss +100 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_ie8.scss +18 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_links.scss +62 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_measurements.scss +95 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_spacing.scss +76 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font.scss +112 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-responsive.scss +195 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_warnings.scss +53 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_all.scss +7 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_compatibility.scss +50 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_exports.scss +33 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_font-url.scss +25 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_ie8.scss +51 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_image-url.scss +25 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_all.scss +2 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
- data/vendor/assets/stylesheets/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
- metadata +130 -3
- data/app/assets/builds/katalyst/govuk/formbuilder.min.css +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c9df88d9d5abc58da448ed9fd96a45ef1924a27dcda9939ef0596b9e21ff3d06
|
|
4
|
+
data.tar.gz: c824d95a58018d8376b8cc9de329ef21b1e8d06d9fca460f9683072a625a0fb9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c7bf61b527e1092fb8327b2ba88d9832d45e99d46a445a8f1a6d1428d81ddc154aa79af57c5e9fb0892ea2da77482bdb0df396b50bc1ef0bd3e8cab6e9b7213
|
|
7
|
+
data.tar.gz: 02c92b8b8822995c73bff3851ce55b418b36e11ff5fd25bbf59021a664602802338104a19c752744edcf2f77e1c79471ce7b6ade424d07f7bf2664135e6cf5dc
|
|
@@ -8,6 +8,7 @@ module Katalyst
|
|
|
8
8
|
initializer "katalyst-govuk-formbuilder.assets" do
|
|
9
9
|
config.after_initialize do |app|
|
|
10
10
|
if app.config.respond_to?(:assets)
|
|
11
|
+
app.config.assets.paths << root.join("vendor/assets/stylesheets")
|
|
11
12
|
app.config.assets.precompile += %w(katalyst-govuk-formbuilder.js)
|
|
12
13
|
end
|
|
13
14
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@import "../base";
|
|
2
|
+
|
|
3
|
+
@import "accordion/index";
|
|
4
|
+
@import "back-link/index";
|
|
5
|
+
@import "breadcrumbs/index";
|
|
6
|
+
@import "button/index";
|
|
7
|
+
@import "checkboxes/index";
|
|
8
|
+
@import "character-count/index";
|
|
9
|
+
@import "cookie-banner/index";
|
|
10
|
+
@import "date-input/index";
|
|
11
|
+
@import "details/index";
|
|
12
|
+
@import "error-message/index";
|
|
13
|
+
@import "error-summary/index";
|
|
14
|
+
@import "fieldset/index";
|
|
15
|
+
@import "file-upload/index";
|
|
16
|
+
@import "footer/index";
|
|
17
|
+
@import "hint/index";
|
|
18
|
+
@import "header/index";
|
|
19
|
+
@import "input/index";
|
|
20
|
+
@import "inset-text/index";
|
|
21
|
+
@import "label/index";
|
|
22
|
+
@import "notification-banner/index";
|
|
23
|
+
@import "pagination/index";
|
|
24
|
+
@import "panel/index";
|
|
25
|
+
@import "phase-banner/index";
|
|
26
|
+
@import "tabs/index";
|
|
27
|
+
@import "tag/index";
|
|
28
|
+
@import "radios/index";
|
|
29
|
+
@import "select/index";
|
|
30
|
+
@import "skip-link/index";
|
|
31
|
+
@import "summary-list/index";
|
|
32
|
+
@import "table/index";
|
|
33
|
+
@import "textarea/index";
|
|
34
|
+
@import "warning-text/index";
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
@include govuk-exports("govuk/component/accordion") {
|
|
2
|
+
$govuk-accordion-base-colour: govuk-colour("black");
|
|
3
|
+
$govuk-accordion-hover-colour: govuk-colour("light-grey", $legacy: "grey-3");
|
|
4
|
+
$govuk-accordion-icon-focus-colour: $govuk-focus-colour;
|
|
5
|
+
$govuk-accordion-bottom-border-width: 1px;
|
|
6
|
+
|
|
7
|
+
.govuk-accordion {
|
|
8
|
+
@include govuk-responsive-margin(6, "bottom");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.govuk-accordion__section {
|
|
12
|
+
padding-top: govuk-spacing(3);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.govuk-accordion__section-heading {
|
|
16
|
+
// Override browser defaults to ensure consistent element height
|
|
17
|
+
margin-top: 0;
|
|
18
|
+
margin-bottom: 0;
|
|
19
|
+
|
|
20
|
+
padding-top: govuk-spacing(3);
|
|
21
|
+
padding-bottom: govuk-spacing(3);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.govuk-accordion__section-button {
|
|
25
|
+
@include govuk-font($size: 24, $weight: bold);
|
|
26
|
+
@include govuk-text-colour;
|
|
27
|
+
|
|
28
|
+
display: block;
|
|
29
|
+
margin-bottom: 0;
|
|
30
|
+
padding-top: govuk-spacing(3);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Remove the bottom margin from the last item inside the content
|
|
34
|
+
.govuk-accordion__section-content > :last-child {
|
|
35
|
+
margin-bottom: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// JavaScript enabled
|
|
39
|
+
.js-enabled {
|
|
40
|
+
.govuk-accordion {
|
|
41
|
+
// Border at the bottom of the whole accordion
|
|
42
|
+
border-bottom: $govuk-accordion-bottom-border-width solid $govuk-border-colour;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.govuk-accordion__section {
|
|
46
|
+
padding-top: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Hide the body of collapsed sections by default for browsers that lack
|
|
50
|
+
// support for `content-visibility` paired with [hidden=until-found]
|
|
51
|
+
.govuk-accordion__section-content {
|
|
52
|
+
display: none;
|
|
53
|
+
|
|
54
|
+
@include govuk-responsive-padding(3, "top");
|
|
55
|
+
@include govuk-responsive-padding(8, "bottom");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Hide the body of collapsed sections using `content-visibility` to enable
|
|
59
|
+
// page search within [hidden=until-found] regions where browser supported
|
|
60
|
+
.govuk-accordion__section-content[hidden] {
|
|
61
|
+
@supports (content-visibility: hidden) {
|
|
62
|
+
content-visibility: hidden;
|
|
63
|
+
display: inherit;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Hide the padding of collapsed sections
|
|
67
|
+
padding-top: 0;
|
|
68
|
+
padding-bottom: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Show the body of expanded sections
|
|
72
|
+
.govuk-accordion__section--expanded .govuk-accordion__section-content {
|
|
73
|
+
display: block;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.govuk-accordion__show-all {
|
|
77
|
+
@include govuk-font($size: 19);
|
|
78
|
+
position: relative;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
|
|
81
|
+
margin-bottom: 9px;
|
|
82
|
+
padding: govuk-spacing(1) 2px govuk-spacing(1) 0;
|
|
83
|
+
|
|
84
|
+
border-width: 0;
|
|
85
|
+
|
|
86
|
+
color: $govuk-link-colour;
|
|
87
|
+
background: none;
|
|
88
|
+
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
-webkit-appearance: none;
|
|
91
|
+
|
|
92
|
+
@include govuk-media-query ($from: tablet) {
|
|
93
|
+
margin-bottom: 14px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Remove default button focus outline in Firefox
|
|
97
|
+
&::-moz-focus-inner {
|
|
98
|
+
padding: 0;
|
|
99
|
+
border: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
color: $govuk-accordion-base-colour;
|
|
104
|
+
background: $govuk-accordion-hover-colour;
|
|
105
|
+
// The GOV.UK Design System focus state adds a box-shadow to the top and bottom of the
|
|
106
|
+
// button. We add a grey box-shadow on hover too, to make the height of the hover state
|
|
107
|
+
// match the height of the focus state.
|
|
108
|
+
box-shadow: 0 -2px $govuk-accordion-hover-colour, 0 4px $govuk-accordion-hover-colour;
|
|
109
|
+
|
|
110
|
+
.govuk-accordion__section-toggle-text {
|
|
111
|
+
color: $govuk-accordion-base-colour;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.govuk-accordion-nav__chevron {
|
|
115
|
+
color: $govuk-accordion-base-colour;
|
|
116
|
+
background: $govuk-accordion-base-colour;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.govuk-accordion-nav__chevron:after {
|
|
120
|
+
color: $govuk-accordion-hover-colour;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:focus {
|
|
125
|
+
@include govuk-focused-text;
|
|
126
|
+
|
|
127
|
+
.govuk-accordion-nav__chevron {
|
|
128
|
+
background: $govuk-accordion-base-colour;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.govuk-accordion-nav__chevron:after {
|
|
132
|
+
color: $govuk-accordion-icon-focus-colour;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.govuk-accordion__section-heading {
|
|
138
|
+
padding: 0;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Create Chevron icon aligned with text
|
|
142
|
+
.govuk-accordion-nav__chevron {
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
display: inline-block;
|
|
145
|
+
|
|
146
|
+
position: relative;
|
|
147
|
+
|
|
148
|
+
// Set size using rems to make the icon scale with text if user resizes text in their browser
|
|
149
|
+
width: govuk-px-to-rem(20px);
|
|
150
|
+
height: govuk-px-to-rem(20px);
|
|
151
|
+
|
|
152
|
+
border: govuk-px-to-rem(1px) solid;
|
|
153
|
+
border-radius: 50%;
|
|
154
|
+
|
|
155
|
+
vertical-align: middle;
|
|
156
|
+
|
|
157
|
+
// IE8 fallback of icon
|
|
158
|
+
@include govuk-if-ie8 {
|
|
159
|
+
display: inline-block;
|
|
160
|
+
max-height: 20px;
|
|
161
|
+
line-height: 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Create inner chevron arrow
|
|
165
|
+
&:after {
|
|
166
|
+
content: "";
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
display: block;
|
|
169
|
+
|
|
170
|
+
position: absolute;
|
|
171
|
+
bottom: govuk-px-to-rem(5px);
|
|
172
|
+
left: govuk-px-to-rem(6px);
|
|
173
|
+
|
|
174
|
+
width: govuk-px-to-rem(6px);
|
|
175
|
+
height: govuk-px-to-rem(6px);
|
|
176
|
+
|
|
177
|
+
-webkit-transform: rotate(-45deg);
|
|
178
|
+
|
|
179
|
+
-ms-transform: rotate(-45deg);
|
|
180
|
+
|
|
181
|
+
transform: rotate(-45deg);
|
|
182
|
+
|
|
183
|
+
border-top: govuk-px-to-rem(2px) solid;
|
|
184
|
+
border-right: govuk-px-to-rem(2px) solid;
|
|
185
|
+
|
|
186
|
+
// IE8 fallback of icon with HTML symbol
|
|
187
|
+
@include govuk-if-ie8 {
|
|
188
|
+
content: "\25B2"; // "▲"
|
|
189
|
+
position: relative;
|
|
190
|
+
border: 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Rotate icon to create "Down" version
|
|
196
|
+
.govuk-accordion-nav__chevron--down {
|
|
197
|
+
-webkit-transform: rotate(180deg);
|
|
198
|
+
-ms-transform: rotate(180deg);
|
|
199
|
+
transform: rotate(180deg);
|
|
200
|
+
|
|
201
|
+
// IE8 fallback of arrow icon
|
|
202
|
+
@include govuk-if-ie8 {
|
|
203
|
+
&:after {
|
|
204
|
+
content: "\25BC"; // "▼"
|
|
205
|
+
-webkit-transform: none;
|
|
206
|
+
-ms-transform: none;
|
|
207
|
+
transform: none;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.govuk-accordion__section-button {
|
|
213
|
+
width: 100%;
|
|
214
|
+
|
|
215
|
+
padding: govuk-spacing(2) 0 0 0;
|
|
216
|
+
|
|
217
|
+
border: 0;
|
|
218
|
+
|
|
219
|
+
border-top: $govuk-accordion-bottom-border-width solid $govuk-border-colour;
|
|
220
|
+
|
|
221
|
+
// Visually separate the section from the one underneath when user changes colours in their
|
|
222
|
+
// browser. See https://github.com/alphagov/govuk-frontend/issues/2321#issuecomment-924201488
|
|
223
|
+
border-bottom: govuk-spacing(2) solid transparent;
|
|
224
|
+
|
|
225
|
+
color: $govuk-text-colour;
|
|
226
|
+
background: none;
|
|
227
|
+
|
|
228
|
+
text-align: left;
|
|
229
|
+
// Section headers have a pointer cursor as an additional affordance
|
|
230
|
+
cursor: pointer;
|
|
231
|
+
-webkit-appearance: none;
|
|
232
|
+
|
|
233
|
+
@include govuk-media-query ($from: tablet) {
|
|
234
|
+
padding-bottom: govuk-spacing(2);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&:active {
|
|
238
|
+
color: $govuk-link-active-colour;
|
|
239
|
+
background: none;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&:hover {
|
|
243
|
+
color: $govuk-accordion-base-colour;
|
|
244
|
+
background: $govuk-accordion-hover-colour;
|
|
245
|
+
|
|
246
|
+
.govuk-accordion__section-toggle-text {
|
|
247
|
+
color: $govuk-accordion-base-colour;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.govuk-accordion-nav__chevron {
|
|
251
|
+
color: $govuk-accordion-base-colour;
|
|
252
|
+
background: $govuk-accordion-base-colour;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.govuk-accordion-nav__chevron:after {
|
|
256
|
+
color: $govuk-accordion-hover-colour;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&:focus {
|
|
261
|
+
// Remove default focus border around button as
|
|
262
|
+
// styling is being applied to inner text elements that receive focus
|
|
263
|
+
outline: 0;
|
|
264
|
+
|
|
265
|
+
.govuk-accordion__section-heading-text-focus,
|
|
266
|
+
.govuk-accordion__section-summary-focus,
|
|
267
|
+
.govuk-accordion__section-toggle-focus {
|
|
268
|
+
@include govuk-focused-text;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.govuk-accordion-nav__chevron {
|
|
272
|
+
color: $govuk-accordion-base-colour;
|
|
273
|
+
background: $govuk-accordion-base-colour;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.govuk-accordion-nav__chevron:after {
|
|
277
|
+
color: $govuk-accordion-icon-focus-colour;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Remove default button focus outline in Firefox
|
|
282
|
+
&::-moz-focus-inner {
|
|
283
|
+
padding: 0;
|
|
284
|
+
border: 0;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Remove the transparent border when the section is expanded to make it clear that the heading
|
|
289
|
+
// relates to the content below. Adjust padding to maintain the height of the element.
|
|
290
|
+
// See https://github.com/alphagov/govuk-frontend/pull/2257#issuecomment-951920798
|
|
291
|
+
.govuk-accordion__section--expanded .govuk-accordion__section-button {
|
|
292
|
+
padding-bottom: govuk-spacing(3);
|
|
293
|
+
border-bottom: 0;
|
|
294
|
+
|
|
295
|
+
@include govuk-media-query ($from: tablet) {
|
|
296
|
+
padding-bottom: govuk-spacing(4);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// As Chevron icon is vertically aligned it overlaps with the focus state bottom border
|
|
301
|
+
// Styling adds some spacing
|
|
302
|
+
.govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus {
|
|
303
|
+
padding-bottom: 3px;
|
|
304
|
+
|
|
305
|
+
@include govuk-media-query ($from: desktop) {
|
|
306
|
+
padding-bottom: 2px;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.govuk-accordion__section-toggle,
|
|
311
|
+
.govuk-accordion__section-heading-text,
|
|
312
|
+
.govuk-accordion__section-summary {
|
|
313
|
+
display: block;
|
|
314
|
+
margin-bottom: 13px;
|
|
315
|
+
|
|
316
|
+
.govuk-accordion__section-heading-text-focus,
|
|
317
|
+
.govuk-accordion__section-summary-focus,
|
|
318
|
+
.govuk-accordion__section-toggle-focus {
|
|
319
|
+
display: inline;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Add toggle link with Chevron icon on left.
|
|
324
|
+
.govuk-accordion__section-toggle {
|
|
325
|
+
@include govuk-typography-responsive($size: 19);
|
|
326
|
+
@include govuk-typography-weight-regular;
|
|
327
|
+
color: $govuk-link-colour;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// Add space between the icon and text.
|
|
331
|
+
// Avoid applying spacing directly to the icon as the use of `transform` will change the
|
|
332
|
+
// placement of any margins.
|
|
333
|
+
.govuk-accordion__show-all-text,
|
|
334
|
+
.govuk-accordion__section-toggle-text {
|
|
335
|
+
margin-left: govuk-spacing(1);
|
|
336
|
+
vertical-align: middle;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Background colour adjustment when user changes colours in Firefox
|
|
340
|
+
//
|
|
341
|
+
// When user changes colours in Firefox, text colour inside <button> is always black
|
|
342
|
+
// (regardless of the custom colours the user has set). This is fine when the text in the
|
|
343
|
+
// button is not nested inside another element because when user changes colours in Firefox,
|
|
344
|
+
// the immediate background colour of buttons is always white (again, regardless of user's
|
|
345
|
+
// custom colours).
|
|
346
|
+
//
|
|
347
|
+
// However, when the text inside <button> is wrapped inside another element AND that element
|
|
348
|
+
// sets a background colour, the text colour is still black but the background of that nested
|
|
349
|
+
// element gets the user's custom background colour. When the custom background is a lighter
|
|
350
|
+
// hue, the contrast might be sufficient. But if the user's custom background colour is a
|
|
351
|
+
// darker colour, the contrast with the text might not be sufficient.
|
|
352
|
+
//
|
|
353
|
+
// To ensure sufficient contrast, override the background colour set by the focus state on the
|
|
354
|
+
// nested elements to be transparent.
|
|
355
|
+
//
|
|
356
|
+
// Also override the background colour of the Show/Hide chevrons which set a background colour
|
|
357
|
+
// on hover.
|
|
358
|
+
@media screen and (forced-colors: active) {
|
|
359
|
+
.govuk-accordion__show-all:hover,
|
|
360
|
+
.govuk-accordion__section-button:hover {
|
|
361
|
+
.govuk-accordion-nav__chevron {
|
|
362
|
+
background-color: transparent;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.govuk-accordion__show-all:focus,
|
|
367
|
+
.govuk-accordion__section-button:focus {
|
|
368
|
+
.govuk-accordion__section-heading-text-focus,
|
|
369
|
+
.govuk-accordion__section-summary-focus,
|
|
370
|
+
.govuk-accordion__section-toggle-focus,
|
|
371
|
+
.govuk-accordion-nav__chevron {
|
|
372
|
+
background: transparent;
|
|
373
|
+
background-color: transparent;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// For devices that can't hover such as touch devices,
|
|
379
|
+
// remove hover state as it can be stuck in that state (iOS).
|
|
380
|
+
@media (hover: none) {
|
|
381
|
+
.govuk-accordion__section-header:hover {
|
|
382
|
+
border-top-color: $govuk-border-colour;
|
|
383
|
+
|
|
384
|
+
box-shadow: inset 0 3px 0 0 $govuk-link-colour;
|
|
385
|
+
|
|
386
|
+
.govuk-accordion__section-button {
|
|
387
|
+
border-top-color: $govuk-border-colour;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@include govuk-exports("govuk/component/back-link") {
|
|
2
|
+
// Component font-size on the Frontend (used for calculations)
|
|
3
|
+
$font-size: 16;
|
|
4
|
+
|
|
5
|
+
// Size of chevron (excluding border)
|
|
6
|
+
$chevron-size: govuk-em(7px, $font-size);
|
|
7
|
+
|
|
8
|
+
// Size of chevron border
|
|
9
|
+
$chevron-border-min-width: 1px;
|
|
10
|
+
$chevron-border-width: govuk-em($chevron-border-min-width, $font-size);
|
|
11
|
+
|
|
12
|
+
// Colour of chevron
|
|
13
|
+
$chevron-border-colour: $govuk-secondary-text-colour;
|
|
14
|
+
|
|
15
|
+
.govuk-back-link {
|
|
16
|
+
@include govuk-typography-responsive($size: $font-size);
|
|
17
|
+
@include govuk-link-common;
|
|
18
|
+
@include govuk-link-style-text;
|
|
19
|
+
|
|
20
|
+
display: inline-block;
|
|
21
|
+
position: relative;
|
|
22
|
+
|
|
23
|
+
margin-top: govuk-spacing(3);
|
|
24
|
+
margin-bottom: govuk-spacing(3);
|
|
25
|
+
|
|
26
|
+
// Allow space for the arrow
|
|
27
|
+
padding-left: govuk-em(14px, $font-size);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Prepend left pointing chevron
|
|
31
|
+
.govuk-back-link:before {
|
|
32
|
+
content: "";
|
|
33
|
+
display: block;
|
|
34
|
+
|
|
35
|
+
// Vertically align with the parent element
|
|
36
|
+
position: absolute;
|
|
37
|
+
|
|
38
|
+
@if $govuk-use-legacy-font {
|
|
39
|
+
// Begin adjustments for font baseline offset
|
|
40
|
+
// These should be removed when legacy font support is dropped
|
|
41
|
+
$offset: govuk-em(1px, $font-size);
|
|
42
|
+
top: $offset * -1;
|
|
43
|
+
bottom: $offset;
|
|
44
|
+
} @else {
|
|
45
|
+
top: 0;
|
|
46
|
+
bottom: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
left: govuk-em(3px, $font-size);
|
|
50
|
+
|
|
51
|
+
width: $chevron-size;
|
|
52
|
+
height: $chevron-size;
|
|
53
|
+
|
|
54
|
+
margin: auto 0;
|
|
55
|
+
|
|
56
|
+
-webkit-transform: rotate(225deg);
|
|
57
|
+
|
|
58
|
+
-ms-transform: rotate(225deg);
|
|
59
|
+
|
|
60
|
+
transform: rotate(225deg);
|
|
61
|
+
|
|
62
|
+
border: solid;
|
|
63
|
+
border-width: $chevron-border-min-width $chevron-border-min-width 0 0;
|
|
64
|
+
border-color: $chevron-border-colour;
|
|
65
|
+
|
|
66
|
+
@supports (border-width: unquote("max(0px)")) {
|
|
67
|
+
border-width: unquote("max(#{$chevron-border-min-width}, #{$chevron-border-width}) max(#{$chevron-border-min-width}, #{$chevron-border-width})") 0 0;
|
|
68
|
+
|
|
69
|
+
// Ensure that the chevron never gets smaller than 16px
|
|
70
|
+
font-size: unquote("max(#{$font-size * 1px}, 1em)");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Fall back to a less than sign for IE8
|
|
74
|
+
@include govuk-if-ie8 {
|
|
75
|
+
content: "\003c"; // Less than sign (<)
|
|
76
|
+
width: auto;
|
|
77
|
+
height: auto;
|
|
78
|
+
border: 0;
|
|
79
|
+
color: $chevron-border-colour;
|
|
80
|
+
|
|
81
|
+
// IE8 doesn't seem to like rendering pseudo-elements using @font-faces,
|
|
82
|
+
// so fall back to using another sans-serif font to render the chevron.
|
|
83
|
+
font-family: Arial, sans-serif;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.govuk-back-link:focus:before {
|
|
88
|
+
border-color: $govuk-focus-text-colour;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.govuk-back-link:after {
|
|
92
|
+
content: "";
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: -14px;
|
|
95
|
+
right: 0;
|
|
96
|
+
bottom: -14px;
|
|
97
|
+
left: 0;
|
|
98
|
+
}
|
|
99
|
+
}
|