fix(Slider): incorrect bar-height when vertical (#6065)
This commit is contained in:
+12
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user