2019-09-05 18:06:01 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2019-09-17 19:21:07 +08:00
|
|
|
@import './themes/vars.scss';
|
2019-09-05 18:06:01 +08:00
|
|
|
|
2019-10-22 18:34:49 +08:00
|
|
|
@include themes-mixin {
|
|
|
|
@include b(slider) {
|
2019-12-17 20:39:44 +08:00
|
|
|
@include once {
|
|
|
|
display: block;
|
|
|
|
padding: 5px 0;
|
|
|
|
position: relative;
|
|
|
|
z-index: 0;
|
|
|
|
width: calc(100% - 14px);
|
|
|
|
margin-left: 7px;
|
|
|
|
margin-right: 7px;
|
|
|
|
cursor: pointer;
|
|
|
|
@include b(slider-marks) {
|
|
|
|
position: absolute;
|
|
|
|
top: 14px;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
@include b(slider-mark) {
|
|
|
|
position: absolute;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include m(with-mark) {
|
|
|
|
width: calc(100% - 24px);
|
|
|
|
margin: 8px 12px 32px 12px;
|
|
|
|
}
|
|
|
|
}
|
2019-10-22 18:34:49 +08:00
|
|
|
&:hover {
|
|
|
|
@include b(slider-rail) {
|
|
|
|
background-color: map-get($--slider-rail-background-color, 'hover');
|
|
|
|
@include e(fill) {
|
|
|
|
background-color: map-get($--slider-rail-fill-background-color, 'hover');
|
|
|
|
}
|
|
|
|
@include b(slider-dots) {
|
|
|
|
@include b(slider-dot) {
|
|
|
|
box-shadow: map-get($--slider-dot-box-shadow, 'active');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(slider-handle) {
|
|
|
|
box-shadow: map-get($--slider-handle-box-shadow, 'hover');
|
2019-09-05 18:06:01 +08:00
|
|
|
}
|
2019-10-22 18:34:49 +08:00
|
|
|
}
|
|
|
|
@include m(active) {
|
|
|
|
@include b(slider-rail) {
|
|
|
|
background-color: map-get($--slider-rail-background-color, 'hover');
|
|
|
|
@include e(fill) {
|
|
|
|
background-color: map-get($--slider-rail-fill-background-color, 'hover');
|
2019-10-22 17:08:32 +08:00
|
|
|
}
|
2019-10-22 18:34:49 +08:00
|
|
|
@include b(slider-dots) {
|
|
|
|
@include b(slider-dot) {
|
|
|
|
box-shadow: map-get($--slider-dot-box-shadow, 'active');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(slider-handle) {
|
|
|
|
box-shadow: map-get($--slider-handle-box-shadow, 'hover');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(slider-rail) {
|
2019-12-17 20:39:44 +08:00
|
|
|
@include once {
|
|
|
|
width: 100%;
|
|
|
|
position: relative;
|
|
|
|
}
|
2019-10-22 18:34:49 +08:00
|
|
|
height: $--slider-rail-height;
|
|
|
|
background-color: map-get($--slider-rail-background-color, 'default');
|
|
|
|
transition: background-color .2s $default-cubic-bezier;
|
|
|
|
border-radius: $--slider-rail-height / 2;
|
|
|
|
@include e(fill) {
|
2019-12-17 20:39:44 +08:00
|
|
|
@include once {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
border-radius: $--slider-rail-height / 2;
|
|
|
|
transition: background-color .3s $default-cubic-bezier;
|
|
|
|
}
|
|
|
|
background-color: map-get($--slider-rail-fill-background-color, 'default');
|
2019-10-22 17:08:32 +08:00
|
|
|
}
|
2019-09-05 18:06:01 +08:00
|
|
|
}
|
|
|
|
@include b(slider-handle) {
|
2019-12-17 20:39:44 +08:00
|
|
|
@include once {
|
|
|
|
outline: none;
|
|
|
|
height: $--slider-handle-size;
|
|
|
|
width: $--slider-handle-size;
|
|
|
|
border-radius: $--slider-handle-size / 2;
|
|
|
|
transition: box-shadow .2s $default-cubic-bezier, background-color .3s $default-cubic-bezier;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
overflow: hidden;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2019-10-22 18:34:49 +08:00
|
|
|
background-color: $--slider-handle-background-color;
|
|
|
|
box-shadow: map-get($--slider-handle-box-shadow, 'default');
|
|
|
|
&:hover {
|
|
|
|
box-shadow: map-get($--slider-handle-box-shadow, 'hover');
|
|
|
|
}
|
|
|
|
&:hover:focus {
|
|
|
|
box-shadow: map-get($--slider-handle-box-shadow, 'active');
|
|
|
|
}
|
|
|
|
&:focus {
|
|
|
|
box-shadow: map-get($--slider-handle-box-shadow, 'focus');
|
|
|
|
}
|
2019-09-05 18:06:01 +08:00
|
|
|
}
|
2019-12-17 20:39:44 +08:00
|
|
|
@include b(slider-dots) {
|
|
|
|
@include once {
|
2019-10-22 18:34:49 +08:00
|
|
|
position: absolute;
|
2019-12-17 20:39:44 +08:00
|
|
|
left: 0;
|
|
|
|
top: 50%;
|
|
|
|
right: 0;
|
2019-10-22 18:34:49 +08:00
|
|
|
}
|
|
|
|
@include b(slider-dot) {
|
2019-12-17 20:39:44 +08:00
|
|
|
@include once {
|
|
|
|
transition: box-shadow .3s $default-cubic-bezier, background-color .3s $default-cubic-bezier;
|
|
|
|
position: absolute;
|
|
|
|
transform: translateX(-50%) translateY(-50%);
|
|
|
|
height: $--slider-dot-size;
|
|
|
|
width: $--slider-dot-size;
|
|
|
|
border-radius: $--slider-dot-size / 2;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
2019-10-22 18:34:49 +08:00
|
|
|
box-shadow: map-get($--slider-dot-box-shadow, 'default');
|
|
|
|
}
|
2019-09-05 18:06:01 +08:00
|
|
|
}
|
|
|
|
}
|
2019-10-22 18:34:49 +08:00
|
|
|
@include b(slider-handle-indicator) {
|
2019-12-17 20:39:44 +08:00
|
|
|
@include once {
|
|
|
|
@include fade-in-scale-up-transition();
|
|
|
|
transform: scale(0.99999);
|
|
|
|
font-size: 14px;
|
|
|
|
padding: 8px 12px;
|
|
|
|
margin-bottom: 12px;
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
2019-10-22 18:34:49 +08:00
|
|
|
color: $--slider-indicator-color;
|
|
|
|
background-color: $--slider-indicator-background-color;
|
|
|
|
box-shadow: $--slider-indicator-box-shadow;
|
2019-09-05 18:06:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-22 18:34:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|