nemo-shen 2c02069808
feat(Slider): add range props (#4442)
* feat(Slider): add range props

for support double slider button

* fix(Slider): 优化代码

* fix(Slider): 优化代码

* fix(Slider): 优化代码

* docs(Slider): update doc
2021-09-06 19:52:44 +08:00

57 lines
1.3 KiB
Plaintext

@import '../common/style/var.less';
@import '../common/style/theme.less';
.van-slider {
position: relative;
.theme(height, '@slider-bar-height');
.theme(border-radius, '@border-radius-max');
.theme(background-color, '@slider-inactive-background-color');
// use pseudo element to expand click area
&::before {
position: absolute;
right: 0;
left: 0;
content: '';
.theme(top, '-@padding-xs');
.theme(bottom, '-@padding-xs');
}
&__bar {
position: relative;
width: 100%;
height: 100%;
.theme(background-color, '@slider-active-background-color');
border-radius: inherit;
.theme(transition, 'all @animation-duration-fast');
}
&__button {
.theme(width, '@slider-button-width');
.theme(height, '@slider-button-height');
.theme(border-radius, '@slider-button-border-radius');
.theme(box-shadow, '@slider-button-box-shadow');
.theme(background-color, '@slider-button-background-color');
&-wrapper,
&-wrapper-right {
position: absolute;
top: 50%;
right: 0;
transform: translate3d(50%, -50%, 0);
}
&-wrapper-left {
position: absolute;
top: 50%;
left: 0;
transform: translate3d(-50%, -50%, 0);
}
}
&--disabled {
.theme(opacity, '@slider-disabled-opacity');
}
}