fix(Slider): incorrect bar-height when vertical (#6065)

This commit is contained in:
neverland
2020-04-16 16:23:32 +08:00
committed by GitHub
parent 455be42c11
commit 63f789646d
4 changed files with 22 additions and 11 deletions
+12 -1
View File
@@ -3,6 +3,7 @@
.van-slider {
position: relative;
width: 100%;
height: @slider-bar-height;
background-color: @slider-inactive-background-color;
border-radius: @border-radius-max;
cursor: pointer;
@@ -19,7 +20,8 @@
&__bar {
position: relative;
height: @slider-bar-height;
width: 100%;
height: 100%;
background-color: @slider-active-background-color;
border-radius: inherit;
transition: width @animation-duration-fast;
@@ -57,8 +59,17 @@
.van-slider__button-wrapper {
top: auto;
right: 50%;
bottom: 0;
transform: translate3d(50%, 50%, 0);
}
// use pseudo element to expand click area
&::before {
top: 0;
right: -@padding-xs;
bottom: 0;
left: -@padding-xs;
}
}
}