rex e1f80b569d
refactor(TreeSelect): refactor with sidebar (#2224)
BREAKING CHANGE: rename prop active of sidebar to activeKey
2019-11-01 16:14:52 +08:00

49 lines
1.1 KiB
Plaintext

@import '../common/style/var.less';
@import '../common/style/theme.less';
.van-sidebar-item {
display: block;
box-sizing: border-box;
overflow: hidden;
word-wrap: break-word;
border-left: 3px solid transparent;
user-select: none;
.theme(padding, '@sidebar-padding');
.theme(font-size, '@sidebar-font-size');
.theme(line-height, '@sidebar-line-height');
.theme(color, '@sidebar-text-color');
.theme(background-color, '@sidebar-background-color');
&__text {
position: relative;
display: inline-block;
}
&--hover:not(&--disabled) {
.theme(background-color, '@sidebar-active-color');
}
&::after {
border-bottom-width: 1px;
}
&--selected {
.theme(color, '@sidebar-selected-text-color');
.theme(font-weight, '@sidebar-selected-font-weight');
.theme(border-color, '@sidebar-selected-border-color');
&::after {
border-right-width: 1px;
}
}
&--selected,
&--selected&--hover {
.theme(background-color, '@sidebar-selected-background-color');
}
&--disabled {
.theme(color, '@sidebar-disabled-text-color');
}
}