collapse.scss
1.39 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
@import "mixins/mixins";
@import "common/var";
@import "common/transition";
@include b(collapse) {
border-top: 1px solid $--collapse-border-color;
border-bottom: 1px solid $--collapse-border-color;
}
@include b(collapse-item) {
@include e(header) {
display: flex;
align-items: center;
height: $--collapse-header-height;
line-height: $--collapse-header-height;
background-color: $--collapse-header-fill;
color: $--collapse-header-color;
cursor: pointer;
border-bottom: 1px solid $--collapse-border-color;
font-size: $--collapse-header-size;
font-weight: 500;
transition: border-bottom-color .3s;
outline: none;
@include e(arrow) {
margin: 0 8px 0 auto;
transition: transform .3s;
font-weight: 300;
@include when(active) {
transform: rotate(90deg);
}
}
&.focusing:focus:not(:hover){
color: $--color-primary;
}
@include when(active) {
border-bottom-color: transparent;
}
}
@include e(wrap) {
will-change: height;
background-color: $--collapse-content-fill;
overflow: hidden;
box-sizing: border-box;
border-bottom: 1px solid $--collapse-border-color;
}
@include e(content) {
padding-bottom: 25px;
font-size: $--collapse-content-size;
color: $--collapse-content-color;
line-height: 1.769230769230769;
}
&:last-child {
margin-bottom: -1px;
}
}