diff --git a/package.json b/package.json index 21a2cd1152..91f4bec9c5 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/style/components/collapse.less b/style/components/collapse.less index 2736618ddb..035458348e 100644 --- a/style/components/collapse.less +++ b/style/components/collapse.less @@ -1,5 +1,5 @@ @prefixCls: ant-collapse; -@borderStyle: 1px solid #d9d9d9; +@borderStyle: 1px solid #e9e9e9; #arrow { .common(){ @@ -22,53 +22,64 @@ } .@{prefixCls} { - background-color: #f3f5f7; + background-color: #fbfbfb; border-radius: 3px; border-top: @borderStyle; border-left: @borderStyle; border-right: @borderStyle; + & > &-item { + > .@{prefixCls}-header { + height: 38px; + line-height: 38px; + text-indent: 16px; + color: #666; + border-bottom: @borderStyle; + &:before { + display: inline-block; + content: '\20'; + #arrow > .common(); + #arrow > .right(3px, 4px, #666); + vertical-align: middle; + margin-right: 8px; + } + } + } + &-content { height: 0; - opacity: 0; - transition-property: all; - transition-duration: .2s; - transition-timing-function: ease-in; + transition-duration: .3s; + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); overflow: hidden; color: #999; padding: 0 16px; - background-color: #fbfbfb; - > p, > div { - margin-top: 10px; - margin-bottom: 10px; + background-color: #f4f4f4; + + & > &-box { + margin-top: 16px; + margin-bottom: 16px; } } - &-content-active { - opacity: 1; - height: auto; - border-bottom: @borderStyle; + &-item:last-child { + > .@{prefixCls}-content { + border-radius: 0 0 3px 3px; + } } - &-header { - height: 38px; - line-height: 38px; - text-indent: 16px; - color: #666; + &-content-active { border-bottom: @borderStyle; - &:before { - display: inline-block; - content: '\20'; - #arrow > .common(); - #arrow > .right(3px, 4px, #666); - vertical-align: middle; - margin-right: 8px; - } } - &-item-active { - .@{prefixCls}-header::before { - #arrow > .bottom(3px, 4px, #666); + & > &-item-active { + > .@{prefixCls}-header { + border-bottom: none; + + &:before { + #arrow > .bottom(3px, 4px, #666); + margin-right: 6px; + } } } } +