-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathAccordion.scss
84 lines (71 loc) · 1.57 KB
/
Accordion.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
/* Style the accordion section */
$border: 1px solid var(--du-general-active);
$animation-duration: 0.3s;
.deriv-accordion {
position: relative;
display: inline-flex;
flex-direction: column;
min-width: 100%;
background-color: var(--du-general-main-2);
padding: 24px;
&--compact {
padding: 16px;
}
&--underline {
border-bottom: $border;
}
&--shadow,
&--bordered {
border-radius: $border-radius-2;
margin-bottom: 8px;
&:last-child {
margin-bottom: 0;
}
}
&--bordered {
border: $border;
}
&--shadow {
box-shadow: $deriv-box-shadow;
}
&__header {
outline: none;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
color: var(--du-text-general);
cursor: pointer;
}
&__icon {
margin-left: auto;
display: inline-block;
transition: all $animation-duration ease-in-out;
&--active {
transform: rotate(-180deg);
}
}
&__content {
width: 100%;
overflow: auto;
opacity: 0;
background-color: white;
transition: all $animation-duration ease;
&--active {
opacity: 1;
}
}
&__text {
margin-top: 24px;
color: var(--du-text-general);
&--compact {
margin-top: 16px;
}
}
}
.accordion__section {
position: relative;
display: inline-flex;
flex-direction: column;
min-width: 100%;
}