UNPKG

@b1dr/xip-ui

Version:

A UI library for SolidJS with Themescura

128 lines (119 loc) 2.52 kB
.range_input_wrapper { position: relative; display: flex; flex-direction: column; gap: 0em; &:hover { .value { color: var(--primary-b); } } &:has(.range_input:hover) { .value_bar { background: var(--primary-b); } } } .range_input { appearance: none; width: 100%; height: 1.5em; margin: 0; background: transparent; outline: none; z-index: 4; font-size: 1em; &::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; height: 1em; width: 1em; background: var(--text); border-radius: 50%; cursor: pointer; transition: all ease-in-out 0.2s; outline: 0.125em solid transparent; outline-offset: 0.125em; border: none; } &::-moz-range-thumb { -webkit-appearance: none; appearance: none; height: 1em; width: 1em; background: var(--text); border-radius: 50%; cursor: pointer; transition: all ease-in-out 0.2s; outline: 0.125em solid transparent; outline-offset: 0.125em; border: none; } &:hover { &::-moz-range-thumb { background: var(--primary-b); } &::-webkit-slider-thumb { -webkit-appearance: none; background: var(--primary-b); } } &:focus { &::-moz-range-thumb { outline: 0.125em solid var(--primary-b); background: var(--primary-b); } &::-webkit-slider-thumb { -webkit-appearance: none; background: var(--primary-b); outline: 0.125em solid var(--primary-b); } } &:active { &::-moz-range-thumb { outline: 0.125em solid var(--primary-s-4); } &::-webkit-slider-thumb { -webkit-appearance: none; outline: 0.125em solid var(--primary-s-4); } } } .label_row { display: flex; justify-content: space-between; align-items: center; gap: 0.5em; height: 1.5em; } .value { font-weight: bold; color: var(--text); transition: color 0.2s ease; width: 3ch; text-align: right; } .slider_bar { position: absolute; width: 100%; height: 1em; background: var(--surface-0); bottom: 0.25em; transition: width 0s ease, background 0.2s ease; pointer-events: none; border-radius: 0.5em; z-index: 1; } .value_bar { position: absolute; width: calc(var(--width, 0) / 100 * calc(100% - 0.75em)); height: 0.5em; background: var(--text); opacity: 0.5; bottom: 0.5em; margin: 0 0.275em; transition: width 0s ease, background 0.2s ease; pointer-events: none; border-radius: 0.25em; z-index: 2; }