65 lines
1.2 KiB
SCSS
65 lines
1.2 KiB
SCSS
.range {
|
|
user-select: none;
|
|
background-color: var(--surface);
|
|
border: 1px solid var(--primary);
|
|
border-radius: 3px;
|
|
height: 50px;
|
|
position: relative;
|
|
margin: 38px 6px 18px;
|
|
}
|
|
|
|
.handle {
|
|
height: calc(100% + 20px);
|
|
width: 20px;
|
|
border: 1px solid var(--primary);
|
|
background-color: var(--highlight);
|
|
border-radius: 3px;
|
|
position: absolute;
|
|
top: -10px;
|
|
cursor: ew-resize;
|
|
touch-action: none;
|
|
transition: left .1s;
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
transition: none;
|
|
}
|
|
|
|
&:after {
|
|
content: '|||';
|
|
font-size: 8px;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
height: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--shadow);
|
|
}
|
|
|
|
&:before {
|
|
content: attr(data-label);
|
|
position: absolute;
|
|
bottom: calc(100% + 8px);
|
|
text-align: center;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
white-space: nowrap;
|
|
padding-inline: var(--extra-padding);
|
|
}
|
|
}
|
|
|
|
.selected {
|
|
position: absolute;
|
|
height: 100%;
|
|
top: 0;
|
|
background-color: var(--primary);
|
|
border-radius: 2px;
|
|
transition: left .1s, right .1s;
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
transition: none;
|
|
}
|
|
}
|