style(Sidebar): update border style

This commit is contained in:
chenjiahan
2020-04-23 11:00:13 +08:00
committed by neverland
parent df8f713675
commit a31032e0d6
4 changed files with 23 additions and 17 deletions
+17 -10
View File
@@ -1,6 +1,7 @@
@import '../style/var';
.van-sidebar-item {
position: relative;
display: block;
box-sizing: border-box;
padding: @sidebar-padding;
@@ -10,19 +11,18 @@
line-height: @sidebar-line-height;
word-wrap: break-word;
background-color: @sidebar-background-color;
border-left: 3px solid transparent;
cursor: pointer;
user-select: none;
&:active {
background-color: @sidebar-active-color;
}
&__text {
position: relative;
display: inline-block;
}
&:active {
background-color: @sidebar-active-color;
}
&:not(:last-child)::after {
border-bottom-width: 1px;
}
@@ -30,16 +30,23 @@
&--select {
color: @sidebar-selected-text-color;
font-weight: @sidebar-selected-font-weight;
border-color: @sidebar-selected-border-color;
&::after {
border-right-width: 1px;
}
&,
&:active {
background-color: @sidebar-selected-background-color;
}
&::before {
position: absolute;
top: 50%;
left: 0;
width: 4px;
height: 16px;
background-color: @sidebar-selected-border-color;
border-radius: @border-radius-md;
transform: translateY(-50%);
content: '';
}
}
&--disabled {