Files
Iris/src/scss/components/_slider.scss

93 lines
1.4 KiB
SCSS
Raw Normal View History

2016-11-08 16:57:44 +13:00
.slider {
position: relative;
cursor: pointer;
2018-08-27 08:21:41 +12:00
height: 20px;
2016-11-08 16:57:44 +13:00
&__input {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 100%;
opacity: 0;
z-index: 2;
cursor: pointer;
&::-webkit-slider-thumb {
width: 1px;
border: 0;
}
&::-moz-range-thumb {
width: 1px;
border: 0;
}
&::-ms-thumb {
width: 1px;
border: 0;
}
}
&__track {
2016-11-08 16:57:44 +13:00
position: absolute;
background: rgba(0,0,0,0.2);
2017-06-18 05:47:36 +12:00
border-radius: 2px;
2018-08-27 08:21:41 +12:00
height: 4px;
top: 42%;
right: 0;
left: 0;
margin-top: -3px;
2016-11-08 16:57:44 +13:00
&__progress {
2016-11-08 16:57:44 +13:00
position: absolute;
2018-10-13 14:28:46 +13:00
background: colour(turquoise);
2016-11-08 16:57:44 +13:00
pointer-events: none;
2018-08-27 08:21:41 +12:00
top: 0;
2016-11-08 16:57:44 +13:00
left: 0;
2017-06-18 05:47:36 +12:00
border-radius: 2px;
2018-08-27 08:21:41 +12:00
height: 100%;
max-width: 100%;
border-radius: 4px;
&:after {
@include animate(0.1s);
content: '';
display: block;
2018-10-13 14:28:46 +13:00
background: colour(turquoise);
2018-08-27 08:21:41 +12:00
position: absolute;
top: 0;
right: -1px;
width: 4px;
height: 4px;
border-radius: 50%;
}
2016-11-08 16:57:44 +13:00
}
}
&--disabled,
&--muted {
.slider__track__progress {
2018-10-13 14:28:46 +13:00
background: colour(mid_grey);
2017-05-24 08:41:41 +12:00
2018-08-27 08:21:41 +12:00
&:after {
2018-10-13 14:28:46 +13:00
background: colour(mid_grey) !important;
2016-11-08 16:57:44 +13:00
}
}
}
2018-08-27 08:21:41 +12:00
&:hover {
.slider__track {
&__progress {
2018-08-27 08:21:41 +12:00
&:after {
width: 12px;
height: 12px;
top: -4px;
right: -6px;
2018-10-13 14:28:46 +13:00
background: lighten(colour(turquoise), 10%);
2018-08-27 08:21:41 +12:00
}
2016-11-08 16:57:44 +13:00
}
}
}
}