salix/front/core/components/range/style.scss

85 lines
1.8 KiB
SCSS
Raw Permalink Normal View History

2019-10-18 19:36:30 +00:00
@import "variables";
@mixin range($thumb-selector, $track-selector) {
&::#{$thumb-selector} {
-webkit-appearance: none;
margin-top: -5px;
border-radius: 50%;
2019-11-10 10:08:44 +00:00
background: $color-button;
2019-10-18 19:36:30 +00:00
border: none;
height: 12px;
width: 12px;
border-radius: 50%;
transition-property: transform, box-shadow;
transition-duration: 250ms;
transition-timing-function: ease-out;
}
&:focus::#{$thumb-selector} {
2019-11-10 10:08:44 +00:00
box-shadow: 0 0 0 10px rgba($color-button, .2);
2019-10-18 19:36:30 +00:00
}
&:active::#{$thumb-selector} {
transform: scale(1.5);
box-shadow: none;
}
&:disabled::#{$thumb-selector} {
transform: none;
cursor: initial;
}
&::#{$track-selector} {
width: 100%;
height: 3px;
cursor: inherit;
2019-11-10 10:08:44 +00:00
background: $color-marginal;
2019-10-18 19:36:30 +00:00
border-radius: 2px;
border: none;
}
}
.vn-range {
2019-10-18 19:36:30 +00:00
& > label {
2020-04-02 13:11:42 +00:00
font-size: .75rem;
2019-10-18 19:36:30 +00:00
&.main {
2019-11-10 10:08:44 +00:00
color: $color-button;
2019-10-18 19:36:30 +00:00
}
&.min-label {
float: left;
}
&.max-label {
float: right;
}
}
& > input {
cursor: pointer;
height: 30px;
display: block;
width: 100%;
background: transparent;
border-color: transparent;
-webkit-appearance: none;
2020-04-02 12:20:57 +00:00
margin: 3px 0;
2019-10-18 19:36:30 +00:00
&:focus {
outline: none;
}
&::-moz-focus-outer {
border: 0;
}
@include range(
"-moz-range-thumb",
"-moz-range-track"
);
@include range(
"-webkit-slider-thumb",
"-webkit-slider-runnable-track"
);
@include range(
"-ms-thumb",
"-ms-track"
);
&:disabled {
cursor: initial;
}
}
}