_accordion.scss
2.8 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/**
* Main scss styles
*/
.accordion-wrapper {
margin: 0 auto;
padding: 0;
padding-bottom:12rem;
position: relative;
@include rem('margin', 75, 0, 0, 0);
@include bp-large {
padding-bottom:29.5rem;
@include rem('margin', 95, 0, 0, 0);
}
h2{
text-align:center;
font-size:2.4rem;
margin-bottom:6rem;
color:$darkGray;
}
// accordion panel
.accordion-panel {
margin: 10px auto;
padding: 0;
position: relative;
background: rgba(228,237,244,0.50);
.no-ajax {
@include rem('padding', 20, 37, 20, 37);
}
.accordion-title {
margin: 0;
margin-bottom: 10px;
padding: 0;
padding-bottom: 4px;
cursor: pointer;
.no-ajax {
font-family: TheMixSemiBold;
}
@include rem('padding', 0, 25, 0, 0);
.no-ajax:link, .no-ajax:visited, .no-ajax:active,
.no-ajax {
display: block;
font-size: 1.6rem;
line-height: 20px;
text-decoration: none;
color: $fontColor;
transition: color 300ms;
&:after {
content: '';
position: absolute;
right: 25px;
top: 18px;
height: 20px;
width: 2px;
background: $darkGray;
font-size: 27px;
line-height: 20px;
transition: all 500ms;
border-radius: 2px;
}
&:before {
content: '';
position: absolute;
right: 17px;
top: 27px;
height: 2px;
width: 20px;
background: $darkGray;
font-size: 27px;
line-height: 20px;
transition: all 100ms;
border-radius: 2px;
}
}
a:hover:visited {
&:after {
opacity: 0;
}
}
@media screen and (max-width: 767px) {
font-size: 16px;
line-height: 20px;
padding-bottom: 10px;
}
@media screen and (max-width: 400px) {
font-size: 14px;
line-height: 18px;
padding-bottom: 6px;
}
}
// eo:accordion title
.accordion-content {
p {
font-family: TheMixLight;
font-size: 1.6rem;
@include rem('padding', 15, 35, 47, 35);
line-height: 1.3;
}
}
// eo:accordion content
.accordion-title.open {
.no-ajax:link, .no-ajax:visited, .no-ajax:active, .no-ajax:hover, .no-ajax:hover:visited,
.no-ajax {
&:after {
opacity: 0;
}
}
.accordion-content {
padding: 0;
margin: 0;
max-height: 400px;
opacity: 1;
transition: all 300ms;
}
}
} //eo:accordion panel
} // eo: accordion wrapper
.accordion-title:focus{
outline:none;
}
.accordion-title[aria-selected='true'] .no-ajax:after{
display:none;
}