2020-03-07 19:45:13 +08:00
|
|
|
@import '../../style/themes/index';
|
2019-01-02 21:01:56 +08:00
|
|
|
@import '../../style/mixins/index';
|
2018-02-01 18:18:05 +08:00
|
|
|
|
2019-01-02 21:01:56 +08:00
|
|
|
@collapse-prefix-cls: ~'@{ant-prefix}-collapse';
|
2018-02-01 18:18:05 +08:00
|
|
|
|
|
|
|
.@{collapse-prefix-cls} {
|
|
|
|
.reset-component;
|
2020-03-07 19:45:13 +08:00
|
|
|
|
2018-02-01 18:18:05 +08:00
|
|
|
background-color: @collapse-header-bg;
|
|
|
|
border: @border-width-base @border-style-base @border-color-base;
|
|
|
|
border-bottom: 0;
|
2020-03-07 19:45:13 +08:00
|
|
|
border-radius: @collapse-panel-border-radius;
|
2018-02-01 18:18:05 +08:00
|
|
|
|
|
|
|
& > &-item {
|
|
|
|
border-bottom: @border-width-base @border-style-base @border-color-base;
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
&,
|
|
|
|
& > .@{collapse-prefix-cls}-header {
|
2020-03-07 19:45:13 +08:00
|
|
|
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
|
2018-02-01 18:18:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .@{collapse-prefix-cls}-header {
|
2019-03-05 13:16:32 +08:00
|
|
|
position: relative;
|
2018-09-05 21:28:54 +08:00
|
|
|
padding: @collapse-header-padding;
|
2020-03-07 19:45:13 +08:00
|
|
|
padding-left: @collapse-header-padding-extra;
|
2018-02-01 18:18:05 +08:00
|
|
|
color: @heading-color;
|
2019-03-05 13:16:32 +08:00
|
|
|
line-height: 22px;
|
2018-02-01 18:18:05 +08:00
|
|
|
cursor: pointer;
|
2019-01-02 21:01:56 +08:00
|
|
|
transition: all 0.3s;
|
2018-02-01 18:18:05 +08:00
|
|
|
|
2019-03-05 13:16:32 +08:00
|
|
|
.@{collapse-prefix-cls}-arrow {
|
2018-02-01 18:18:05 +08:00
|
|
|
.iconfont-mixin();
|
2020-03-07 19:45:13 +08:00
|
|
|
|
2018-02-01 18:18:05 +08:00
|
|
|
position: absolute;
|
2019-03-05 13:16:32 +08:00
|
|
|
top: 50%;
|
|
|
|
left: @padding-md;
|
2018-02-01 18:18:05 +08:00
|
|
|
display: inline-block;
|
2019-03-05 13:16:32 +08:00
|
|
|
font-size: @font-size-sm;
|
2018-11-14 21:33:56 +08:00
|
|
|
transform: translateY(-50%);
|
2019-03-05 13:16:32 +08:00
|
|
|
|
2018-11-14 21:33:56 +08:00
|
|
|
& svg {
|
|
|
|
transition: transform 0.24s;
|
2018-02-01 18:18:05 +08:00
|
|
|
}
|
|
|
|
}
|
2018-09-05 21:28:54 +08:00
|
|
|
|
2020-03-07 19:45:13 +08:00
|
|
|
.@{collapse-prefix-cls}-extra {
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
|
2018-09-05 21:28:54 +08:00
|
|
|
&:focus {
|
|
|
|
outline: none;
|
|
|
|
}
|
2018-02-01 18:18:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.@{collapse-prefix-cls}-no-arrow {
|
|
|
|
> .@{collapse-prefix-cls}-header {
|
|
|
|
padding-left: 12px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-07 19:45:13 +08:00
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-01 18:18:05 +08:00
|
|
|
&-anim-active {
|
2019-01-02 21:01:56 +08:00
|
|
|
transition: height 0.2s @ease-out;
|
2018-02-01 18:18:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-content {
|
|
|
|
overflow: hidden;
|
|
|
|
color: @text-color;
|
2018-09-05 21:28:54 +08:00
|
|
|
background-color: @collapse-content-bg;
|
2018-02-01 18:18:05 +08:00
|
|
|
border-top: @border-width-base @border-style-base @border-color-base;
|
|
|
|
|
|
|
|
& > &-box {
|
2018-09-05 21:28:54 +08:00
|
|
|
padding: @collapse-content-padding;
|
2018-02-01 18:18:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-inactive {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-item:last-child {
|
|
|
|
> .@{collapse-prefix-cls}-content {
|
2020-03-07 19:45:13 +08:00
|
|
|
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
|
2018-02-01 18:18:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-borderless {
|
2020-03-07 19:45:13 +08:00
|
|
|
background-color: @collapse-header-bg;
|
2018-02-01 18:18:05 +08:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
& &-item-disabled > &-header {
|
|
|
|
&,
|
|
|
|
& > .arrow {
|
|
|
|
color: @disabled-color;
|
2019-03-05 13:16:32 +08:00
|
|
|
cursor: not-allowed;
|
2018-02-01 18:18:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|