ant-design/components/collapse/style/index.less

159 lines
3.4 KiB
Plaintext
Raw Normal View History

@import '../../style/themes/index';
2018-12-07 20:02:01 +08:00
@import '../../style/mixins/index';
2018-12-07 20:02:01 +08:00
@collapse-prefix-cls: ~'@{ant-prefix}-collapse';
2015-08-20 16:55:42 +08:00
.@{collapse-prefix-cls} {
.reset-component();
2019-04-15 10:52:00 +08:00
background-color: @collapse-header-bg;
border: @border-width-base @border-style-base @border-color-base;
border-bottom: 0;
border-radius: @collapse-panel-border-radius;
2015-07-11 10:17:58 +08:00
2015-07-14 21:09:16 +08:00
& > &-item {
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 {
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 {
position: relative;
padding: @collapse-header-padding;
padding-left: @collapse-header-padding-extra;
2017-03-07 14:29:02 +08:00
color: @heading-color;
line-height: @line-height-base;
cursor: pointer;
2018-12-07 20:02:01 +08:00
transition: all 0.3s;
.clearfix();
.@{collapse-prefix-cls}-arrow {
.iconfont-mixin();
2019-04-15 10:52:00 +08:00
position: absolute;
2020-12-23 17:10:03 +08:00
top: (@font-size-base * @line-height-base - @font-size-sm) / 2;
left: @collapse-header-arrow-left;
display: inline-block;
2020-12-23 17:10:03 +08:00
padding: @collapse-header-padding;
padding-right: 0;
padding-bottom: 0;
padding-left: 0;
font-size: @font-size-sm;
2018-09-01 19:51:46 +08:00
& svg {
2018-08-21 20:03:48 +08:00
transition: transform 0.24s;
}
2015-07-14 21:09:16 +08:00
}
2018-05-07 17:52:45 +08:00
.@{collapse-prefix-cls}-extra {
float: right;
}
2018-05-07 17:52:45 +08:00
&:focus {
outline: none;
}
2015-07-14 21:09:16 +08:00
}
.@{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;
}
}
2015-07-14 21:09:16 +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;
}
}
}
}
2015-07-11 10:17:58 +08:00
&-content {
2015-07-21 15:17:42 +08:00
color: @text-color;
background-color: @collapse-content-bg;
border-top: @border-width-base @border-style-base @border-color-base;
2015-07-14 21:09:16 +08:00
& > &-box {
padding: @collapse-content-padding;
2015-07-11 10:17:58 +08:00
}
2015-08-31 16:58:27 +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 {
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
}
&-borderless {
background-color: @collapse-header-bg;
border: 0;
}
&-borderless > &-item {
2017-10-16 19:53:46 +08:00
border-bottom: 1px solid @border-color-base;
}
2017-09-03 18:24:22 +08:00
&-borderless > &-item:last-child,
&-borderless > &-item:last-child &-header {
border-radius: 0;
}
&-borderless > &-item > &-content {
background-color: transparent;
2017-11-27 14:41:17 +08:00
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;
}
}
2015-07-11 10:17:58 +08:00
}
@import './rtl';