2019-04-16 21:59:25 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 20:02:01 +08:00
|
|
|
@import '../../style/mixins/index';
|
2016-04-27 20:44:36 +08:00
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
@collapse-prefix-cls: ~'@{ant-prefix}-collapse';
|
2017-04-29 02:05:56 +08:00
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{collapse-prefix-cls} {
|
2020-12-22 11:08:12 +08:00
|
|
|
.reset-component();
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2017-04-29 04:04:41 +08:00
|
|
|
background-color: @collapse-header-bg;
|
2017-01-31 16:05:10 +08:00
|
|
|
border: @border-width-base @border-style-base @border-color-base;
|
2017-01-09 17:19:26 +08:00
|
|
|
border-bottom: 0;
|
2019-06-10 19:32:10 +08:00
|
|
|
border-radius: @collapse-panel-border-radius;
|
2015-07-11 10:17:58 +08:00
|
|
|
|
2015-07-14 21:09:16 +08:00
|
|
|
& > &-item {
|
2017-01-31 16:05:10 +08:00
|
|
|
border-bottom: @border-width-base @border-style-base @border-color-base;
|
2017-07-27 17:16:01 +08:00
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
&,
|
|
|
|
& > .@{collapse-prefix-cls}-header {
|
2019-06-10 19:32:10 +08:00
|
|
|
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
|
2017-07-27 17:16:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
> .@{collapse-prefix-cls}-header {
|
2021-11-29 11:32:30 +08:00
|
|
|
position: relative; // Compatible with old version of antd, should remove in next version
|
2021-10-14 17:16:38 +08:00
|
|
|
display: flex;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
align-items: flex-start;
|
2018-04-19 11:36:53 +08:00
|
|
|
padding: @collapse-header-padding;
|
2017-03-07 14:29:02 +08:00
|
|
|
color: @heading-color;
|
2020-04-28 11:16:01 +08:00
|
|
|
line-height: @line-height-base;
|
2015-07-24 22:07:59 +08:00
|
|
|
cursor: pointer;
|
2021-02-01 18:50:02 +08:00
|
|
|
transition: all 0.3s, visibility 0s;
|
2017-02-16 15:35:52 +08:00
|
|
|
|
2019-01-23 10:41:07 +08:00
|
|
|
.@{collapse-prefix-cls}-arrow {
|
2019-02-15 10:48:07 +08:00
|
|
|
display: inline-block;
|
2021-10-14 17:16:38 +08:00
|
|
|
margin-right: @margin-sm;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: @font-size-sm;
|
2021-05-19 15:01:15 +08:00
|
|
|
vertical-align: -1px;
|
2019-01-23 10:41:07 +08:00
|
|
|
|
2018-09-01 19:51:46 +08:00
|
|
|
& svg {
|
2018-08-21 20:03:48 +08:00
|
|
|
transition: transform 0.24s;
|
2015-08-23 16:27:43 +08:00
|
|
|
}
|
2015-07-14 21:09:16 +08:00
|
|
|
}
|
2018-05-07 17:52:45 +08:00
|
|
|
|
2022-07-28 20:30:41 +08:00
|
|
|
.@{collapse-prefix-cls}-header-text {
|
|
|
|
flex: auto;
|
|
|
|
}
|
|
|
|
|
2019-03-04 19:14:25 +08:00
|
|
|
.@{collapse-prefix-cls}-extra {
|
2021-10-14 17:16:38 +08:00
|
|
|
margin-left: auto;
|
2019-03-04 19:14:25 +08:00
|
|
|
}
|
|
|
|
|
2018-05-07 17:52:45 +08:00
|
|
|
&:focus {
|
|
|
|
outline: none;
|
|
|
|
}
|
2015-07-14 21:09:16 +08:00
|
|
|
}
|
2017-12-13 23:23:38 +08:00
|
|
|
|
2020-11-30 15:20:42 +08:00
|
|
|
.@{collapse-prefix-cls}-header-collapsible-only {
|
|
|
|
cursor: default;
|
|
|
|
.@{collapse-prefix-cls}-header-text {
|
2022-07-28 20:30:41 +08:00
|
|
|
flex: none;
|
2020-11-30 15:20:42 +08:00
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-20 19:32:18 +08:00
|
|
|
.@{collapse-prefix-cls}-icon-collapsible-only {
|
|
|
|
cursor: default;
|
|
|
|
.@{collapse-prefix-cls}-expand-icon {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-13 23:23:38 +08:00
|
|
|
&.@{collapse-prefix-cls}-no-arrow {
|
|
|
|
> .@{collapse-prefix-cls}-header {
|
2021-10-14 17:16:38 +08:00
|
|
|
padding-left: @padding-sm;
|
2017-12-13 23:23:38 +08:00
|
|
|
}
|
|
|
|
}
|
2015-07-14 21:09:16 +08:00
|
|
|
}
|
|
|
|
|
2022-05-27 16:07:32 +08:00
|
|
|
// Expand Icon end
|
|
|
|
&-icon-position-end {
|
2019-04-28 17:03:19 +08:00
|
|
|
& > .@{collapse-prefix-cls}-item {
|
|
|
|
> .@{collapse-prefix-cls}-header {
|
2021-10-27 12:02:18 +08:00
|
|
|
position: relative;
|
2019-04-28 17:03:19 +08:00
|
|
|
padding: @collapse-header-padding;
|
|
|
|
padding-right: @collapse-header-padding-extra;
|
|
|
|
|
|
|
|
.@{collapse-prefix-cls}-arrow {
|
2021-05-26 22:41:19 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
2019-04-28 17:03:19 +08:00
|
|
|
right: @padding-md;
|
2019-10-09 16:37:24 +08:00
|
|
|
left: auto;
|
2021-05-26 22:43:32 +08:00
|
|
|
margin: 0;
|
2021-05-26 22:41:19 +08:00
|
|
|
transform: translateY(-50%);
|
2019-04-28 17:03:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-11 10:17:58 +08:00
|
|
|
&-content {
|
2015-07-21 15:17:42 +08:00
|
|
|
color: @text-color;
|
2018-04-19 11:36:53 +08:00
|
|
|
background-color: @collapse-content-bg;
|
2017-10-18 17:16:14 +08:00
|
|
|
border-top: @border-width-base @border-style-base @border-color-base;
|
2015-07-14 21:09:16 +08:00
|
|
|
|
|
|
|
& > &-box {
|
2018-04-19 11:36:53 +08:00
|
|
|
padding: @collapse-content-padding;
|
2015-07-11 10:17:58 +08:00
|
|
|
}
|
2015-08-31 16:58:27 +08:00
|
|
|
|
2020-11-30 15:20:42 +08:00
|
|
|
&-hidden {
|
2016-03-30 16:27:14 +08:00
|
|
|
display: none;
|
2015-08-31 16:58:27 +08:00
|
|
|
}
|
2015-07-11 10:17:58 +08:00
|
|
|
}
|
|
|
|
|
2015-07-14 21:09:16 +08:00
|
|
|
&-item:last-child {
|
2015-08-20 16:55:42 +08:00
|
|
|
> .@{collapse-prefix-cls}-content {
|
2019-06-10 19:32:10 +08:00
|
|
|
border-radius: 0 0 @collapse-panel-border-radius @collapse-panel-border-radius;
|
2015-07-14 21:09:16 +08:00
|
|
|
}
|
2015-07-11 10:17:58 +08:00
|
|
|
}
|
|
|
|
|
2016-11-06 15:06:34 +08:00
|
|
|
&-borderless {
|
2020-01-07 13:10:30 +08:00
|
|
|
background-color: @collapse-header-bg;
|
2016-11-06 15:06:34 +08:00
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
&-borderless > &-item {
|
2017-10-16 19:53:46 +08:00
|
|
|
border-bottom: 1px solid @border-color-base;
|
2017-09-27 22:32:49 +08:00
|
|
|
}
|
|
|
|
|
2017-09-03 18:24:22 +08:00
|
|
|
&-borderless > &-item:last-child,
|
|
|
|
&-borderless > &-item:last-child &-header {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
|
2022-03-10 19:29:50 +08:00
|
|
|
// hide the last border-bottom in borderless mode
|
|
|
|
&-borderless > &-item:last-child {
|
|
|
|
border-bottom: 0;
|
|
|
|
}
|
|
|
|
|
2017-01-09 17:19:26 +08:00
|
|
|
&-borderless > &-item > &-content {
|
|
|
|
background-color: transparent;
|
2017-11-27 14:41:17 +08:00
|
|
|
border-top: 0;
|
2017-01-09 17:19:26 +08:00
|
|
|
}
|
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
&-borderless > &-item > &-content > &-content-box {
|
|
|
|
padding-top: 4px;
|
2016-11-06 15:06:34 +08:00
|
|
|
}
|
2017-05-17 12:05:42 +08:00
|
|
|
|
2020-06-05 13:42:46 +08:00
|
|
|
&-ghost {
|
|
|
|
background-color: transparent;
|
|
|
|
border: 0;
|
|
|
|
> .@{collapse-prefix-cls}-item {
|
|
|
|
border-bottom: 0;
|
|
|
|
> .@{collapse-prefix-cls}-content {
|
|
|
|
background-color: transparent;
|
|
|
|
border-top: 0;
|
2020-06-08 16:19:05 +08:00
|
|
|
> .@{collapse-prefix-cls}-content-box {
|
|
|
|
padding-top: 12px;
|
|
|
|
padding-bottom: 12px;
|
|
|
|
}
|
2020-06-05 13:42:46 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-17 12:05:42 +08:00
|
|
|
& &-item-disabled > &-header {
|
|
|
|
&,
|
|
|
|
& > .arrow {
|
|
|
|
color: @disabled-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: not-allowed;
|
2017-05-17 12:05:42 +08:00
|
|
|
}
|
|
|
|
}
|
2015-07-11 10:17:58 +08:00
|
|
|
}
|
2020-03-19 12:13:24 +08:00
|
|
|
|
|
|
|
@import './rtl';
|