feat: collapse style review and change

This commit is contained in:
翰文 2015-07-14 21:09:16 +08:00
parent 076b8e1e33
commit 6011f5caeb
2 changed files with 42 additions and 31 deletions

View File

@ -17,7 +17,7 @@
"gregorian-calendar-format": "~3.0.1",
"object-assign": "~3.0.0",
"rc-calendar": "~3.10.0",
"rc-collapse": "~1.2.0",
"rc-collapse": "~1.2.2",
"rc-dialog": "~4.4.0",
"rc-dropdown": "~1.1.1",
"rc-input-number": "~2.0.1",

View File

@ -1,5 +1,5 @@
@prefixCls: ant-collapse;
@borderStyle: 1px solid #d9d9d9;
@borderStyle: 1px solid #e9e9e9;
#arrow {
.common(){
@ -22,35 +22,14 @@
}
.@{prefixCls} {
background-color: #f3f5f7;
background-color: #fbfbfb;
border-radius: 3px;
border-top: @borderStyle;
border-left: @borderStyle;
border-right: @borderStyle;
&-content {
height: 0;
opacity: 0;
transition-property: all;
transition-duration: .2s;
transition-timing-function: ease-in;
overflow: hidden;
color: #999;
padding: 0 16px;
background-color: #fbfbfb;
> p, > div {
margin-top: 10px;
margin-bottom: 10px;
}
}
&-content-active {
opacity: 1;
height: auto;
border-bottom: @borderStyle;
}
&-header {
& > &-item {
> .@{prefixCls}-header {
height: 38px;
line-height: 38px;
text-indent: 16px;
@ -65,10 +44,42 @@
margin-right: 8px;
}
}
}
&-item-active {
.@{prefixCls}-header::before {
&-content {
height: 0;
transition-duration: .3s;
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
overflow: hidden;
color: #999;
padding: 0 16px;
background-color: #f4f4f4;
& > &-box {
margin-top: 16px;
margin-bottom: 16px;
}
}
&-item:last-child {
> .@{prefixCls}-content {
border-radius: 0 0 3px 3px;
}
}
&-content-active {
border-bottom: @borderStyle;
}
& > &-item-active {
> .@{prefixCls}-header {
border-bottom: none;
&:before {
#arrow > .bottom(3px, 4px, #666);
margin-right: 6px;
}
}
}
}