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

115 lines
1.6 KiB
SCSS
Raw Normal View History

2016-11-08 16:57:44 +13:00
.slider {
position: relative;
cursor: pointer;
input[type="range"]{
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;
}
}
2016-11-08 16:57:44 +13:00
.track {
position: absolute;
background: rgba(0,0,0,0.2);
2017-06-18 05:47:36 +12:00
border-radius: 2px;
2016-11-08 16:57:44 +13:00
.progress {
position: absolute;
background: $turquoise;
pointer-events: none;
left: 0;
2017-06-18 05:47:36 +12:00
border-radius: 2px;
2016-11-08 16:57:44 +13:00
}
}
2017-05-24 08:41:41 +12:00
&.disabled {
.progress {
background: rgba(255,255,255,0.25);
}
}
2016-11-08 16:57:44 +13:00
&.horizontal {
height: 20px;
.track {
2017-07-26 15:24:18 +12:00
height: 4px;
2017-07-26 09:27:57 +12:00
top: 42%;
2016-11-08 16:57:44 +13:00
right: 0;
left: 0;
2017-06-22 08:59:40 +12:00
margin-top: -3px;
2016-11-08 16:57:44 +13:00
.progress {
top: 0;
height: 100%;
2018-04-21 13:56:43 +12:00
max-width: 100%;
border-radius: 4px;
&:after {
@include animate(0.1s);
content: '';
display: block;
background: $turquoise;
position: absolute;
top: 0;
right: -1px;
width: 4px;
height: 4px;
border-radius: 50%;
}
}
}
&:hover {
.track {
.progress {
&:after {
width: 12px;
height: 12px;
top: -4px;
right: -6px;
background: lighten($turquoise, 10%);
}
}
2016-11-08 16:57:44 +13:00
}
}
}
&.vertical {
width: 20px;
height: 100%;
.track {
width: 5px;
2016-11-08 16:57:44 +13:00
top: 0;
bottom: 0;
left: 12px;
2016-11-08 16:57:44 +13:00
.progress {
bottom: 0;
width: 100%;
2018-04-21 13:56:43 +12:00
max-height: 100%;
2016-11-08 16:57:44 +13:00
}
}
}
}