govuk_tech_docs 2.2.2 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of govuk_tech_docs might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.nvmrc +1 -1
- data/.travis.yml +2 -0
- data/CHANGELOG.md +24 -0
- data/example/config/tech-docs.yml +1 -0
- data/example/source/single-page-nav.html.md +13 -0
- data/govuk_tech_docs.gemspec +2 -1
- data/lib/assets/javascripts/_modules/collapsible-navigation.js +7 -7
- data/lib/assets/javascripts/_modules/in-page-navigation.js +2 -4
- data/lib/assets/stylesheets/_govuk_tech_docs.scss +9 -10
- data/lib/assets/stylesheets/modules/_search.scss +4 -25
- data/lib/assets/stylesheets/modules/_technical-documentation.scss +1 -1
- data/lib/assets/stylesheets/modules/_toc.scss +11 -11
- data/lib/govuk_tech_docs/table_of_contents/heading.rb +5 -1
- data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +2 -2
- data/lib/govuk_tech_docs/table_of_contents/helpers.rb +22 -11
- data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +1 -1
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/source/layouts/_header.erb +1 -2
- data/lib/source/layouts/layout.erb +3 -1
- data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
- data/node_modules/govuk-frontend/govuk/all.js +306 -94
- data/node_modules/govuk-frontend/govuk/all.scss +1 -3
- data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -29
- data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
- data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
- data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
- data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +17 -9
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +129 -24
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
- data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
- data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
- data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
- data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
- data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
- data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
- data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
- data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
- data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
- data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
- data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
- data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
- data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +76 -28
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
- data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
- data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
- data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
- data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
- data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
- data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
- data/node_modules/govuk-frontend/govuk/core/_links.scss +13 -3
- data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
- data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
- data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -4
- data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
- data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
- data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +246 -33
- data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -6
- data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -2
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +8 -7
- data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
- data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
- data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
- data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -4
- data/node_modules/govuk-frontend/govuk/objects/_grid.scss +3 -6
- data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -4
- data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +6 -4
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -4
- data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
- data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
- data/node_modules/govuk-frontend/govuk/overrides/_width.scss +6 -3
- data/node_modules/govuk-frontend/govuk/settings/_all.scss +2 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +11 -5
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +42 -35
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
- data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
- data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +4 -5
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +14 -5
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
- data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
- data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -4
- data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
- data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -4
- data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
- data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
- data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
- data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
- data/package-lock.json +358 -288
- data/package.json +2 -2
- metadata +56 -4
@@ -1,29 +1,33 @@
|
|
1
|
-
@import "
|
2
|
-
|
3
|
-
@import "
|
4
|
-
@import "
|
5
|
-
@import "
|
6
|
-
@import "
|
7
|
-
@import "
|
8
|
-
@import "
|
9
|
-
@import "
|
10
|
-
@import "
|
11
|
-
@import "
|
12
|
-
@import "
|
13
|
-
@import "
|
14
|
-
@import "
|
15
|
-
@import "
|
16
|
-
@import "
|
17
|
-
@import "
|
18
|
-
@import "
|
19
|
-
@import "
|
20
|
-
@import "
|
21
|
-
@import "
|
22
|
-
@import "
|
23
|
-
@import "
|
24
|
-
@import "
|
25
|
-
@import "
|
26
|
-
@import "
|
27
|
-
@import "
|
28
|
-
@import "
|
29
|
-
@import "
|
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 "summary-list/index";
|
11
|
+
@import "date-input/index";
|
12
|
+
@import "details/index";
|
13
|
+
@import "error-message/index";
|
14
|
+
@import "error-summary/index";
|
15
|
+
@import "fieldset/index";
|
16
|
+
@import "file-upload/index";
|
17
|
+
@import "footer/index";
|
18
|
+
@import "hint/index";
|
19
|
+
@import "header/index";
|
20
|
+
@import "input/index";
|
21
|
+
@import "inset-text/index";
|
22
|
+
@import "label/index";
|
23
|
+
@import "notification-banner/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 "table/index";
|
32
|
+
@import "textarea/index";
|
33
|
+
@import "warning-text/index";
|
@@ -1,208 +1,2 @@
|
|
1
|
-
@import "../../
|
2
|
-
@import "
|
3
|
-
@import "../../helpers/all";
|
4
|
-
|
5
|
-
|
6
|
-
@include govuk-exports("govuk/component/accordion") {
|
7
|
-
|
8
|
-
$govuk-accordion-link-colour: $govuk-link-colour;
|
9
|
-
$govuk-accordion-link-hover-colour: govuk-colour("light-blue");
|
10
|
-
$govuk-accordion-border-width: 3px;
|
11
|
-
|
12
|
-
.govuk-accordion {
|
13
|
-
@include govuk-responsive-margin(6, "bottom");
|
14
|
-
}
|
15
|
-
|
16
|
-
// Borders between accordion sections
|
17
|
-
.govuk-accordion__section {
|
18
|
-
padding-top: govuk-spacing(3);
|
19
|
-
}
|
20
|
-
|
21
|
-
.govuk-accordion__section-header {
|
22
|
-
padding-top: govuk-spacing(3);
|
23
|
-
padding-bottom: govuk-spacing(3);
|
24
|
-
}
|
25
|
-
|
26
|
-
.govuk-accordion__section-heading {
|
27
|
-
margin-top: 0; // Override browser default
|
28
|
-
margin-bottom: 0; // Override browser default
|
29
|
-
}
|
30
|
-
|
31
|
-
// Buttons within the sections don’t need default styling
|
32
|
-
.govuk-accordion__section-button {
|
33
|
-
@include govuk-font($size: 24, $weight: bold);
|
34
|
-
display: inline-block;
|
35
|
-
margin-bottom: 0;
|
36
|
-
padding-top: govuk-spacing(3);
|
37
|
-
}
|
38
|
-
|
39
|
-
.govuk-accordion__section-summary {
|
40
|
-
margin-top: govuk-spacing(2);
|
41
|
-
margin-bottom: 0;
|
42
|
-
}
|
43
|
-
|
44
|
-
// Remove the bottom margin from the last item inside the content
|
45
|
-
.govuk-accordion__section-content > :last-child {
|
46
|
-
margin-bottom: 0;
|
47
|
-
}
|
48
|
-
|
49
|
-
// JavaScript enabled
|
50
|
-
.js-enabled {
|
51
|
-
|
52
|
-
.govuk-accordion {
|
53
|
-
// Border at the bottom of the whole accordion
|
54
|
-
border-bottom: 1px solid $govuk-border-colour;
|
55
|
-
}
|
56
|
-
|
57
|
-
// Borders between accordion sections
|
58
|
-
.govuk-accordion__section {
|
59
|
-
padding-top: 0;
|
60
|
-
}
|
61
|
-
|
62
|
-
// Hide the body of collapsed sections
|
63
|
-
.govuk-accordion__section-content {
|
64
|
-
display: none;
|
65
|
-
@include govuk-responsive-padding(3, "top");
|
66
|
-
@include govuk-responsive-padding(3, "bottom");
|
67
|
-
}
|
68
|
-
|
69
|
-
// Show the body of expanded sections
|
70
|
-
.govuk-accordion__section--expanded .govuk-accordion__section-content {
|
71
|
-
display: block;
|
72
|
-
}
|
73
|
-
|
74
|
-
// This is styled to look like a link not a button
|
75
|
-
.govuk-accordion__open-all {
|
76
|
-
@include govuk-font($size: 16);
|
77
|
-
position: relative;
|
78
|
-
z-index: 1;
|
79
|
-
margin: 0;
|
80
|
-
padding: 0;
|
81
|
-
border-width: 0;
|
82
|
-
color: $govuk-link-colour;
|
83
|
-
background: none;
|
84
|
-
cursor: pointer;
|
85
|
-
-webkit-appearance: none;
|
86
|
-
|
87
|
-
@include govuk-link-common;
|
88
|
-
@include govuk-link-style-default;
|
89
|
-
|
90
|
-
// Remove default button focus outline in Firefox
|
91
|
-
&::-moz-focus-inner {
|
92
|
-
padding: 0;
|
93
|
-
border: 0;
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
|
-
// Section headers have a pointer cursor as an additional affordance
|
98
|
-
.govuk-accordion__section-header {
|
99
|
-
position: relative;
|
100
|
-
// Safe area on the right to avoid clashing with icon
|
101
|
-
padding-right: 40px;
|
102
|
-
border-top: 1px solid $govuk-border-colour;
|
103
|
-
color: $govuk-accordion-link-colour;
|
104
|
-
cursor: pointer;
|
105
|
-
}
|
106
|
-
|
107
|
-
// For devices that can't hover such as touch devices,
|
108
|
-
// remove hover state as it can be stuck in that state (iOS).
|
109
|
-
@media (hover: none) {
|
110
|
-
.govuk-accordion__section-header:hover {
|
111
|
-
border-top-color: $govuk-accordion-link-colour;
|
112
|
-
box-shadow: inset 0 $govuk-accordion-border-width 0 0 $govuk-accordion-link-colour;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
|
116
|
-
// Buttons within the headers don’t need default styling
|
117
|
-
.govuk-accordion__section-button {
|
118
|
-
@include govuk-typography-common;
|
119
|
-
margin-top: 0;
|
120
|
-
margin-bottom: 0;
|
121
|
-
margin-left: 0;
|
122
|
-
padding: 0;
|
123
|
-
border-width: 0;
|
124
|
-
color: inherit;
|
125
|
-
background: none;
|
126
|
-
text-align: left;
|
127
|
-
cursor: pointer;
|
128
|
-
-webkit-appearance: none;
|
129
|
-
|
130
|
-
&:focus {
|
131
|
-
@include govuk-focused-text;
|
132
|
-
}
|
133
|
-
|
134
|
-
// Remove default button focus outline in Firefox
|
135
|
-
&::-moz-focus-inner {
|
136
|
-
padding: 0;
|
137
|
-
border: 0;
|
138
|
-
}
|
139
|
-
}
|
140
|
-
|
141
|
-
// Extend the touch area of the button to span the section header
|
142
|
-
.govuk-accordion__section-button:after {
|
143
|
-
content: "";
|
144
|
-
position: absolute;
|
145
|
-
top: 0;
|
146
|
-
right: 0;
|
147
|
-
bottom: 0;
|
148
|
-
left: 0;
|
149
|
-
}
|
150
|
-
|
151
|
-
.govuk-accordion__section-button:hover:not(:focus) {
|
152
|
-
text-decoration: underline;
|
153
|
-
}
|
154
|
-
|
155
|
-
// For devices that can't hover such as touch devices,
|
156
|
-
// remove hover state as it can be stuck in that state (iOS).
|
157
|
-
@media (hover: none) {
|
158
|
-
.govuk-accordion__section-button:hover {
|
159
|
-
text-decoration: none;
|
160
|
-
}
|
161
|
-
}
|
162
|
-
|
163
|
-
.govuk-accordion__controls {
|
164
|
-
text-align: right;
|
165
|
-
}
|
166
|
-
|
167
|
-
// Display an icon to the right of each header to indicate open/closed status,
|
168
|
-
// and as an additional affordance.
|
169
|
-
.govuk-accordion__icon {
|
170
|
-
position: absolute;
|
171
|
-
top: 50%;
|
172
|
-
right: 15px;
|
173
|
-
width: 16px;
|
174
|
-
height: 16px;
|
175
|
-
margin-top: -8px;
|
176
|
-
}
|
177
|
-
|
178
|
-
.govuk-accordion__icon:after,
|
179
|
-
.govuk-accordion__icon:before {
|
180
|
-
content: "";
|
181
|
-
box-sizing: border-box;
|
182
|
-
position: absolute;
|
183
|
-
top: 0;
|
184
|
-
right: 0;
|
185
|
-
bottom: 0;
|
186
|
-
left: 0;
|
187
|
-
width: 25%;
|
188
|
-
height: 25%;
|
189
|
-
margin: auto;
|
190
|
-
border: 2px solid transparent;
|
191
|
-
background-color: govuk-colour("black");
|
192
|
-
}
|
193
|
-
|
194
|
-
.govuk-accordion__icon:before {
|
195
|
-
width: 100%;
|
196
|
-
}
|
197
|
-
|
198
|
-
.govuk-accordion__icon:after {
|
199
|
-
height: 100%;
|
200
|
-
}
|
201
|
-
|
202
|
-
// Vertical bar should be hidden when section is open, to display a '-' icon
|
203
|
-
.govuk-accordion__section--expanded .govuk-accordion__icon:after {
|
204
|
-
content: " ";
|
205
|
-
display: none;
|
206
|
-
}
|
207
|
-
}
|
208
|
-
}
|
1
|
+
@import "../../base";
|
2
|
+
@import "./index";
|
@@ -0,0 +1,197 @@
|
|
1
|
+
@include govuk-exports("govuk/component/accordion") {
|
2
|
+
.govuk-accordion {
|
3
|
+
@include govuk-responsive-margin(6, "bottom");
|
4
|
+
}
|
5
|
+
|
6
|
+
// Borders between accordion sections
|
7
|
+
.govuk-accordion__section {
|
8
|
+
padding-top: govuk-spacing(3);
|
9
|
+
}
|
10
|
+
|
11
|
+
.govuk-accordion__section-header {
|
12
|
+
padding-top: govuk-spacing(3);
|
13
|
+
padding-bottom: govuk-spacing(3);
|
14
|
+
}
|
15
|
+
|
16
|
+
.govuk-accordion__section-heading {
|
17
|
+
// Override browser defaults to ensure consistent element height
|
18
|
+
// Font size is set in .govuk-accordion__section-button
|
19
|
+
@include govuk-font(24);
|
20
|
+
|
21
|
+
margin-top: 0; // Override browser default
|
22
|
+
margin-bottom: 0; // Override browser default
|
23
|
+
}
|
24
|
+
|
25
|
+
// Buttons within the sections don’t need default styling
|
26
|
+
.govuk-accordion__section-button {
|
27
|
+
@include govuk-font($size: 24, $weight: bold);
|
28
|
+
display: inline-block;
|
29
|
+
margin-bottom: 0;
|
30
|
+
padding-top: govuk-spacing(3);
|
31
|
+
}
|
32
|
+
|
33
|
+
.govuk-accordion__section-summary {
|
34
|
+
margin-top: govuk-spacing(2);
|
35
|
+
margin-bottom: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Remove the bottom margin from the last item inside the content
|
39
|
+
.govuk-accordion__section-content > :last-child {
|
40
|
+
margin-bottom: 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
// JavaScript enabled
|
44
|
+
.js-enabled {
|
45
|
+
.govuk-accordion {
|
46
|
+
// Border at the bottom of the whole accordion
|
47
|
+
border-bottom: 1px solid $govuk-border-colour;
|
48
|
+
}
|
49
|
+
|
50
|
+
// Borders between accordion sections
|
51
|
+
.govuk-accordion__section {
|
52
|
+
padding-top: 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
// Hide the body of collapsed sections
|
56
|
+
.govuk-accordion__section-content {
|
57
|
+
display: none;
|
58
|
+
@include govuk-responsive-padding(3, "top");
|
59
|
+
@include govuk-responsive-padding(3, "bottom");
|
60
|
+
}
|
61
|
+
|
62
|
+
// Show the body of expanded sections
|
63
|
+
.govuk-accordion__section--expanded .govuk-accordion__section-content {
|
64
|
+
display: block;
|
65
|
+
}
|
66
|
+
|
67
|
+
// This is styled to look like a link not a button
|
68
|
+
.govuk-accordion__open-all {
|
69
|
+
@include govuk-font($size: 16);
|
70
|
+
position: relative;
|
71
|
+
z-index: 1;
|
72
|
+
margin: 0;
|
73
|
+
padding: 0;
|
74
|
+
border-width: 0;
|
75
|
+
color: $govuk-link-colour;
|
76
|
+
background: none;
|
77
|
+
cursor: pointer;
|
78
|
+
-webkit-appearance: none;
|
79
|
+
|
80
|
+
@include govuk-link-common;
|
81
|
+
@include govuk-link-style-default;
|
82
|
+
|
83
|
+
// Remove default button focus outline in Firefox
|
84
|
+
&::-moz-focus-inner {
|
85
|
+
padding: 0;
|
86
|
+
border: 0;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
// Section headers have a pointer cursor as an additional affordance
|
91
|
+
.govuk-accordion__section-header {
|
92
|
+
position: relative;
|
93
|
+
// Safe area on the right to avoid clashing with icon
|
94
|
+
padding-right: 40px;
|
95
|
+
border-top: 1px solid $govuk-border-colour;
|
96
|
+
cursor: pointer;
|
97
|
+
}
|
98
|
+
|
99
|
+
// Buttons within the headers don’t need default styling
|
100
|
+
.govuk-accordion__section-button {
|
101
|
+
@include govuk-typography-common;
|
102
|
+
margin-top: 0;
|
103
|
+
margin-bottom: 0;
|
104
|
+
margin-left: 0;
|
105
|
+
padding: 0;
|
106
|
+
border-width: 0;
|
107
|
+
color: $govuk-link-colour;
|
108
|
+
background: none;
|
109
|
+
text-align: left;
|
110
|
+
cursor: pointer;
|
111
|
+
-webkit-appearance: none;
|
112
|
+
|
113
|
+
&:focus {
|
114
|
+
@include govuk-focused-text;
|
115
|
+
}
|
116
|
+
|
117
|
+
// Remove default button focus outline in Firefox
|
118
|
+
&::-moz-focus-inner {
|
119
|
+
padding: 0;
|
120
|
+
border: 0;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
// Extend the touch area of the button to span the section header
|
125
|
+
.govuk-accordion__section-button:after {
|
126
|
+
content: "";
|
127
|
+
position: absolute;
|
128
|
+
top: 0;
|
129
|
+
right: 0;
|
130
|
+
bottom: 0;
|
131
|
+
left: 0;
|
132
|
+
}
|
133
|
+
|
134
|
+
.govuk-accordion__section-button:hover:not(:focus) {
|
135
|
+
color: $govuk-link-hover-colour;
|
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;
|
142
|
+
}
|
143
|
+
|
144
|
+
// For devices that can't hover such as touch devices,
|
145
|
+
// remove hover state as it can be stuck in that state (iOS).
|
146
|
+
@media (hover: none) {
|
147
|
+
.govuk-accordion__section-button:hover {
|
148
|
+
text-decoration: none;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
.govuk-accordion__controls {
|
153
|
+
text-align: right;
|
154
|
+
}
|
155
|
+
|
156
|
+
// Display an icon to the right of each header to indicate open/closed status,
|
157
|
+
// and as an additional affordance.
|
158
|
+
.govuk-accordion__icon {
|
159
|
+
position: absolute;
|
160
|
+
top: 50%;
|
161
|
+
right: 15px;
|
162
|
+
width: 16px;
|
163
|
+
height: 16px;
|
164
|
+
margin-top: -8px;
|
165
|
+
}
|
166
|
+
|
167
|
+
.govuk-accordion__icon:after,
|
168
|
+
.govuk-accordion__icon:before {
|
169
|
+
content: "";
|
170
|
+
box-sizing: border-box;
|
171
|
+
position: absolute;
|
172
|
+
top: 0;
|
173
|
+
right: 0;
|
174
|
+
bottom: 0;
|
175
|
+
left: 0;
|
176
|
+
width: 25%;
|
177
|
+
height: 25%;
|
178
|
+
margin: auto;
|
179
|
+
border: 2px solid transparent;
|
180
|
+
background-color: govuk-colour("black");
|
181
|
+
}
|
182
|
+
|
183
|
+
.govuk-accordion__icon:before {
|
184
|
+
width: 100%;
|
185
|
+
}
|
186
|
+
|
187
|
+
.govuk-accordion__icon:after {
|
188
|
+
height: 100%;
|
189
|
+
}
|
190
|
+
|
191
|
+
// Vertical bar should be hidden when section is open, to display a '-' icon
|
192
|
+
.govuk-accordion__section--expanded .govuk-accordion__icon:after {
|
193
|
+
content: " ";
|
194
|
+
display: none;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|