index.less
3.34 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
@import '../../style/themes/index';
@import '../../style/mixins/index';
@collapse-prefix-cls: ~'@{ant-prefix}-collapse';
.@{collapse-prefix-cls} {
.reset-component;
background-color: @collapse-header-bg;
border: @border-width-base @border-style-base @border-color-base;
border-bottom: 0;
border-radius: @collapse-panel-border-radius;
& > &-item {
border-bottom: @border-width-base @border-style-base @border-color-base;
&:last-child {
&,
& > .@{collapse-prefix-cls}-header {
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
}
}
> .@{collapse-prefix-cls}-header {
position: relative;
padding: @collapse-header-padding;
padding-left: @collapse-header-padding-extra;
color: @heading-color;
line-height: @line-height-base;
cursor: pointer;
transition: all 0.3s;
.clearfix;
.@{collapse-prefix-cls}-arrow {
.iconfont-mixin();
position: absolute;
top: ceil(@padding-sm + (@font-size-base * @line-height-base - @font-size-base) / 2);
left: @collapse-header-arrow-left;
display: inline-block;
font-size: @font-size-sm;
& svg {
transition: transform 0.24s;
}
}
.@{collapse-prefix-cls}-extra {
float: right;
}
&:focus {
outline: none;
}
}
.@{collapse-prefix-cls}-header-collapsible-only {
cursor: default;
.@{collapse-prefix-cls}-header-text {
cursor: pointer;
}
}
&.@{collapse-prefix-cls}-no-arrow {
> .@{collapse-prefix-cls}-header {
padding-left: 12px;
}
}
}
// Expand Icon right
&-icon-position-right {
& > .@{collapse-prefix-cls}-item {
> .@{collapse-prefix-cls}-header {
padding: @collapse-header-padding;
padding-right: @collapse-header-padding-extra;
.@{collapse-prefix-cls}-arrow {
right: @padding-md;
left: auto;
}
}
}
}
&-content {
color: @text-color;
background-color: @collapse-content-bg;
border-top: @border-width-base @border-style-base @border-color-base;
& > &-box {
padding: @collapse-content-padding;
}
&-hidden {
display: none;
}
}
&-item:last-child {
> .@{collapse-prefix-cls}-content {
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
}
}
&-borderless {
background-color: @collapse-header-bg;
border: 0;
}
&-borderless > &-item {
border-bottom: 1px solid @border-color-base;
}
&-borderless > &-item:last-child,
&-borderless > &-item:last-child &-header {
border-radius: 0;
}
&-borderless > &-item > &-content {
background-color: transparent;
border-top: 0;
}
&-borderless > &-item > &-content > &-content-box {
padding-top: 4px;
}
&-ghost {
background-color: transparent;
border: 0;
> .@{collapse-prefix-cls}-item {
border-bottom: 0;
> .@{collapse-prefix-cls}-content {
background-color: transparent;
border-top: 0;
> .@{collapse-prefix-cls}-content-box {
padding-top: 12px;
padding-bottom: 12px;
}
}
}
}
& &-item-disabled > &-header {
&,
& > .arrow {
color: @disabled-color;
cursor: not-allowed;
}
}
}
@import './rtl';