naive-ui/styles/Collapse.scss

72 lines
1.9 KiB
SCSS
Raw Normal View History

2019-08-12 14:29:42 +08:00
@import './mixins/mixins.scss';
2019-10-12 00:31:45 +08:00
@include themes-mixin {
@include b(collapse) {
2019-11-29 14:45:32 +08:00
@include once {
width: 100%;
}
2019-10-12 00:31:45 +08:00
@include b(collapse-item) {
@include once {
overflow: hidden;
font-size: 14px;
transition: border-color .3s $--n-ease-in-out-cubic-bezier;
2019-10-12 00:31:45 +08:00
margin-top: 16px;
&:first-child {
margin-top: 0px;
}
&:first-child > {
2019-11-29 14:45:32 +08:00
@include e(header) {
2019-10-12 00:31:45 +08:00
padding-top: 0px;
}
}
@include b(collapse-item) {
margin-left: 32px;
}
@include e(content-wrapper) {
@include fade-in-height-expand-transition($duration: .15s);
overflow: hidden;
}
@include m(active) {
2019-11-29 14:45:32 +08:00
@include e(header) {
2019-10-12 00:31:45 +08:00
@include m(active) {
@include b(icon) {
transform: rotate(90deg);
}
}
}
}
}
&:not(:first-child) {
2019-11-29 14:45:32 +08:00
border-top: 1px solid $--collapse-border-color;
2019-10-12 00:31:45 +08:00
}
2019-11-29 14:45:32 +08:00
@include e(header) {
2019-10-12 00:31:45 +08:00
@include once {
transition: color .3s $--n-ease-in-out-cubic-bezier;
2019-10-12 00:31:45 +08:00
position: relative;
cursor: pointer;
margin-left: 18px;
padding: 16px 0 0 0;
@include b(icon) {
transition: transform .15s $--n-ease-in-out-cubic-bezier, fill .3s $--n-ease-in-out-cubic-bezier;
2019-10-12 00:31:45 +08:00
font-size: 16px;
position: absolute;
left: -18px;
bottom: 0px;
}
}
2019-11-29 14:45:32 +08:00
color: $--collapse-header-text-color;
2019-10-24 18:04:31 +08:00
@include b(icon) {
2019-11-29 14:45:32 +08:00
fill: $--collapse-header-text-color;
2019-10-24 18:04:31 +08:00
}
2019-10-12 00:31:45 +08:00
}
@include e(content-inner) {
@include once {
transition: color .3s $--n-ease-in-out-cubic-bezier;
2019-10-12 00:31:45 +08:00
padding-top: 16px;
}
2019-11-29 14:45:32 +08:00
color: $--collapse-content-text-color;
2019-08-12 14:29:42 +08:00
}
}
}
2019-10-12 00:31:45 +08:00
}