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