/
_expander.scss
94 lines (79 loc) · 1.64 KB
/
_expander.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@import "govuk_publishing_components/individual_component_support";
.app-c-expander {
padding: 0 0 govuk-spacing(2);
margin-bottom: govuk-spacing(2);
border-bottom: 1px solid $govuk-border-colour;
}
.app-c-expander__title {
@include govuk-font(19);
cursor: pointer;
}
.app-c-expander__content {
padding: govuk-spacing(2) 13px;
.govuk-form-group:last-child {
margin-bottom: 0;
}
}
.js-enabled {
.app-c-expander__heading {
position: relative;
padding: 10px 8px 5px 43px;
margin: 0;
}
.app-c-expander__content {
display: none;
}
.app-c-expander__content--visible {
display: block;
}
[aria-expanded="true"] ~ .app-c-expander__icon--up {
display: block;
}
[aria-expanded="false"] ~ .app-c-expander__icon--down {
display: block;
}
}
.app-c-expander__icon {
display: none;
position: absolute;
top: 0;
left: 9px;
width: 30px;
height: 40px;
fill: govuk-colour("black");
}
.app-c-expander__button {
@include govuk-font(19);
border: 0;
background: none;
text-align: left;
cursor: pointer;
padding: 0;
color: $govuk-link-colour;
&:hover {
text-decoration: underline;
text-underline-offset: .1em;
@include govuk-link-hover-decoration;
}
&:focus {
outline: none;
text-decoration: none;
@include govuk-focused-text;
}
// Extend the touch area of the button to span the heading
&::after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 2;
}
}
.app-c-expander__selected-counter {
@include govuk-font($size: 14);
display: block;
color: $govuk-text-colour;
margin-top: 3px;
}