amis/scss/components/_collapse.scss

52 lines
1.2 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Collapse {
padding: 0;
margin-bottom: $Form-item-gap;
&-header {
font-size: $fontSizeMd;
font-weight: $fontWeightNormal;
color: $text--loud-color;
padding: px2rem(5px) 0;
border-bottom: $borderWidth solid lighten($borderColor, 5%);
}
&-arrow {
display: inline-block;
width: px2rem(16px);
text-align: center;
margin-left: $gap-xs;
cursor: pointer;
2019-04-30 11:11:25 +08:00
&:before {
content: "";
2019-04-30 11:11:25 +08:00
position: relative;
display: inline-block;
width: px2rem(6px);
height: px2rem(6px);
top: px2rem(-4px);
border-color: $text-color;
border-style: solid;
border-width: px2rem(1px) px2rem(1px) 0 0;
transform: rotate(135deg);
2019-07-08 20:16:09 +08:00
transform-origin: 50% 50%;
2019-04-30 11:11:25 +08:00
}
}
&.is-collapsed &-arrow:before {
transform: rotate(45deg);
2019-07-08 20:16:09 +08:00
transform-origin: 0% 50%;
2019-04-30 11:11:25 +08:00
}
&--collapsable &-header {
user-select: none;
}
2019-08-13 20:10:11 +08:00
&-content {
transition: height .35s ease;
&.in, &.out {
height: 0;
overflow: hidden;
}
}
}