element/packages/theme-chalk/src/tree.scss

102 lines
1.9 KiB
SCSS
Raw Normal View History

@import "mixins/mixins";
@import "common/var";
@include b(tree) {
cursor: default;
background: $--color-white;
border: 1px solid $--color-black;
@include e(empty-block) {
position: relative;
min-height: 60px;
text-align: center;
width: 100%;
height: 100%;
}
@include e(empty-text) {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: mix($--color-primary, rgb(158, 68, 0), 50%);
}
}
@include b(tree-node) {
white-space: nowrap;
@include e(content) {
line-height: 36px;
height: 36px;
cursor: pointer;
& > .el-checkbox,
& > .el-tree-node__expand-icon {
margin-right: 8px;
}
& > .el-checkbox {
vertical-align: middle;
}
&:hover {
background: $--color-black;
}
}
@include e(expand-icon) {
display: inline-block;
cursor: pointer;
width: 0;
height: 0;
vertical-align: middle;
margin-left: 10px;
border: 6px solid transparent;
border-right-width: 0;
border-left-color: $--color-black;
border-left-width: 7px;
transform: rotate(0deg);
transition: transform 0.3s ease-in-out;
&:hover {
border-left-color: #999;
}
&.expanded {
transform: rotate(90deg);
}
&.is-leaf {
border-color: transparent;
cursor: default;
}
}
@include e(label) {
font-size: $--font-size-base;
vertical-align: middle;
display: inline-block;
}
@include e(loading-icon) {
display: inline-block;
vertical-align: middle;
margin-right: 4px;
font-size: $--font-size-base;
color: $--color-black;
}
& > .el-tree-node__children {
overflow: hidden;
background-color: transparent;
}
&.is-expanded > .el-tree-node__children {
display: block;
}
}
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
background-color: mix($--color-primary, $--color-white, 92%);
}