ant-design/style/components/collapse.less
2015-08-23 15:33:15 +08:00

82 lines
1.5 KiB
Plaintext

@collapse-prefix-cls: ant-collapse;
#arrow {
.close() {
.iconfont-size-under-12px(7px, 270deg);
}
.open() {
.iconfont-size-under-12px(7px, 360deg);
}
}
.@{collapse-prefix-cls} {
background-color: #f4f4f4;
border-radius: 3px;
border: 1px solid #d9d9d9;
& > &-item {
border-top: 1px solid #d9d9d9;
&:first-child {
border-top: none;
}
> .@{collapse-prefix-cls}-header {
height: 38px;
line-height: 38px;
padding-left: 16px;
color: #666;
cursor: pointer;
&:before {
font-family: "anticon" !important;
color: #666;
display: inline-block;
margin-right: 8px;
content: "\e60f";
#arrow > .close();
vertical-align: middle;
transition: transform 0.24s ease;
position: relative;
top: -1px;
}
}
}
&-content {
height: 0;
overflow: hidden;
color: @text-color;
padding: 0 16px;
background-color: #fff;
& > &-box {
padding-top: 16px;
padding-bottom: 16px;
}
}
&-collapsing {
transition-duration: .3s;
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transition-property: height;
}
&-item:last-child {
> .@{collapse-prefix-cls}-content {
border-radius: 0 0 3px 3px;
}
}
&-content-active {
height: auto;
}
& > &-item-active {
> .@{collapse-prefix-cls}-header {
&:before {
#arrow > .open();
}
}
}
}