| | .slider { |
| | min-height: 15px; |
| | } |
| |
|
| | |
| | .slider input[type="range"] { |
| | --value: 0%; |
| | --lower: #10b981; |
| | --upper: rgba(255, 255, 255, 0.3); |
| | --size: 6px; |
| | --active-size: 10px; |
| | --thumb-size: 12px; |
| | --thumb-active-size: 16px; |
| | --thumb-color: #fff; |
| |
|
| | cursor: pointer; |
| | background: linear-gradient( |
| | to right, |
| | var(--lower) 0%, |
| | var(--lower) var(--value), |
| | var(--upper) var(--value), |
| | var(--upper) 100% |
| | ); |
| | border-radius: var(--size); |
| | height: var(--size); |
| | width: 100%; |
| | outline: none; |
| | touch-action: manipulation; |
| | -webkit-appearance: none; |
| | -moz-appearance: none; |
| | transition: height ease-in-out 0.2s; |
| | } |
| | .slider input[type="range"]:hover, |
| | .slider input[type="range"]:active { |
| | height: var(--active-size); |
| | } |
| |
|
| | |
| | |
| | .slider input[type="range"]::-moz-range-thumb { |
| | width: var(--thumb-size); |
| | height: var(--thumb-size); |
| | background-color: var(--thumb-color); |
| | border-radius: 100%; |
| | cursor: pointer; |
| | box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4); |
| | transition: width ease-in-out 0.2s, height ease-in-out 0.2s, box-shadow ease-in-out 0.2s; |
| | } |
| | .slider input[type="range"]:hover::-moz-range-thumb, |
| | .slider input[type="range"]:active::-moz-range-thumb { |
| | width: var(--thumb-active-size); |
| | height: var(--thumb-active-size); |
| | box-shadow: 0 0 16px rgba(16, 185, 129, 0.6); |
| | } |
| |
|
| | .slider input[type="range"]::-webkit-slider-thumb { |
| | width: var(--thumb-size); |
| | height: var(--thumb-size); |
| | background-color: var(--thumb-color); |
| | border-radius: 100%; |
| | cursor: pointer; |
| | box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4); |
| | -webkit-appearance: none; |
| | transition: width ease-in-out 0.2s, height ease-in-out 0.2s, box-shadow ease-in-out 0.2s; |
| | } |
| | .slider input[type="range"]:hover::-webkit-slider-thumb, |
| | .slider input[type="range"]:active::-webkit-slider-thumb { |
| | width: var(--thumb-active-size); |
| | height: var(--thumb-active-size); |
| | box-shadow: 0 0 16px rgba(16, 185, 129, 0.6); |
| | } |
| |
|
| | .slider input[type="range"]::-ms-thumb { |
| | width: var(--thumb-size); |
| | height: var(--thumb-size); |
| | background-color: var(--thumb-color); |
| | border-radius: 100%; |
| | cursor: pointer; |
| | box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4); |
| | transition: width ease-in-out 0.2s, height ease-in-out 0.2s, box-shadow ease-in-out 0.2s; |
| | } |
| | .slider input[type="range"]:hover::-ms-thumb, |
| | .slider input[type="range"]:active::-ms-thumb { |
| | width: var(--thumb-active-size); |
| | height: var(--thumb-active-size); |
| | box-shadow: 0 0 16px rgba(16, 185, 129, 0.6); |
| | } |
| |
|
| | |
| | .slider input[type="range"]::-ms-track { |
| | background: transparent; |
| | border-color: transparent; |
| | border-width: var(--size) 0; |
| | color: transparent; |
| | width: 100%; |
| | height: var(--size); |
| | cursor: pointer; |
| | transition: width ease-in-out 0.2s, height ease-in-out 0.2s; |
| | } |
| |
|
| | .slider input[type="range"]::-ms-fill-lower, |
| | .slider input[type="range"]:focus::-ms-fill-lower { |
| | background: var(--lower); |
| | border-radius: var(--size); |
| | } |
| |
|
| | .slider input[type="range"]::-ms-fill-upper, |
| | .slider input[type="range"]:focus::-ms-fill-upper { |
| | background: var(--upper); |
| | border-radius: var(--size); |
| | } |
| |
|