StaticApps/src/theme/components/_range.scss

95 lines
1.5 KiB
SCSS

.range {
-webkit-appearance: none;
width: 100%;
margin: .5rem 0;
background-color: rgba(0, 0, 0, 0.12);
&.center {
margin-left: auto;
margin-right: auto;
}
&.right {
margin-left: 10%;
}
&:focus {
outline: none;
}
&::-webkit-slider-runnable-track {
width: 100%;
height: .3rem;
cursor: pointer;
background-color: rgba(0, 0, 0, 0.12);
color: rgba(0, 0, 0, 0.12);
border-radius: 9999px;
border: none;
}
&::-webkit-slider-thumb {
border: 0 solid rgba(0, 0, 30, 0);
height: 1rem;
width: 1rem;
border-radius: 9999px;
background: $primary;
cursor: pointer;
-webkit-appearance: none;
margin-top: -.33rem;
}
&::-moz-range-track {
width: 100%;
height: .3rem;
cursor: pointer;
background-color: rgba(0, 0, 0, 0.12);
color: rgba(0, 0, 0, 0.12);
border-radius: 9999px;
border: none;
}
&::-moz-range-thumb {
border: 0 solid rgba(0, 0, 30, 0);
height: 1rem;
width: 1rem;
border-radius: 9999px;
background: $primary;
cursor: pointer;
margin-top: -.33rem;
}
}
.input-range {
display: block;
position: relative;
margin-bottom: 2rem;
.max, .min, .current {
font-size: .8em;
color: #dcdcdc;
position: absolute;
bottom: -1rem;
}
.current {
display: block;
width: 100%;
text-align: center;
&:focus {
outline: none;
font-weight: bold;
color: $second;
}
}
.min {
left: 0;
}
.max {
right: 0;
}
}