iview/src/styles/components/collapse.less

70 lines
1.7 KiB
Text
Raw Normal View History

@collapse-prefix-cls: ~"@{css-prefix}collapse";
.@{collapse-prefix-cls}{
background-color: @background-color-base;
border-radius: 3px;
border: 1px solid @border-color-base;
2018-06-21 19:14:09 +08:00
&-simple{
border-left: none;
border-right: none;
background-color: #fff;
}
& > &-item{
border-top: 1px solid @border-color-base;
&:first-child {
border-top: 0;
}
> .@{collapse-prefix-cls}-header{
height: 38px;
line-height: 38px;
2018-06-21 16:45:42 +08:00
padding-left: 16px;
color: #666;
cursor: pointer;
position: relative;
2018-06-21 16:45:42 +08:00
border-bottom: 1px solid transparent;
transition: all @transition-time @ease-in-out;
> i{
transition: transform @transition-time @ease-in-out;
2018-06-21 16:45:42 +08:00
margin-right: 14px;
}
}
}
2018-06-21 16:45:42 +08:00
& > &-item&-item-active > &-header{
border-bottom: 1px solid @border-color-base;
}
2018-06-21 19:14:09 +08:00
&-simple > &-item&-item-active > &-header{
border-bottom: 1px solid transparent;
}
& > &-item&-item-active > &-header > i{
transform: rotate(90deg);
}
&-content{
//display: none;
2018-03-14 11:49:10 +08:00
//overflow: hidden;
color: @text-color;
padding: 0 16px;
background-color: #fff;
& > &-box {
padding-top: 16px;
padding-bottom: 16px;
}
}
2018-06-21 19:14:09 +08:00
&-simple > &-item > &-content > &-content-box{
padding-top: 0;
}
&-item-active > &-content{
//display: block;
}
&-item:last-child {
> .@{collapse-prefix-cls}-content {
border-radius: 0 0 3px 3px;
}
}
}