mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-23 19:32:14 +00:00
feat: Customize range slider
Signed-off-by: Avior <github@avior.me>
This commit is contained in:
parent
cdedcddf4e
commit
5601a40f1d
@ -160,6 +160,55 @@
|
||||
~ .autocomplete:hover ~ svg.rotate
|
||||
transform rotateX(180deg)
|
||||
|
||||
input[type="range"]
|
||||
appearance none
|
||||
background transparent
|
||||
cursor pointer
|
||||
width 100%
|
||||
border none
|
||||
|
||||
$height = 4px
|
||||
&::-webkit-slider-runnable-track
|
||||
appearance none
|
||||
background-color nativeRGB(var(--theme-100))
|
||||
height $height
|
||||
width 100%
|
||||
border-radius $height
|
||||
transition $transition
|
||||
@media (prefers-color-scheme dark)
|
||||
background-color nativeRGB(var(--gray-800))
|
||||
&:active::-webkit-slider-runnable-track
|
||||
background nativeRGB(var(--theme-200))
|
||||
@media (prefers-color-scheme dark)
|
||||
background-color nativeRGB(var(--gray-700))
|
||||
&::-moz-range-track
|
||||
appearance none
|
||||
background-color nativeRGB(var(--theme-100))
|
||||
height $height
|
||||
width 100%
|
||||
border-radius $height
|
||||
transition $transition
|
||||
@media (prefers-color-scheme dark)
|
||||
background-color nativeRGB(var(--gray-800))
|
||||
&::-webkit-slider-thumb
|
||||
appearance none
|
||||
$size = 16px
|
||||
margin-top ($height / 2) - ($size / 2)
|
||||
height $size
|
||||
width $size
|
||||
border none
|
||||
background-color nativeRGB(var(--theme-500))
|
||||
border-radius $size
|
||||
&::-moz-range-thumb
|
||||
appearance none
|
||||
$size = 16px
|
||||
margin-top ($height / 2) - ($size / 2)
|
||||
height $size
|
||||
width $size
|
||||
border none
|
||||
background-color nativeRGB(var(--theme-500))
|
||||
border-radius $size
|
||||
|
||||
p
|
||||
padding 0 8px
|
||||
font-size rem(14)
|
||||
|
Loading…
x
Reference in New Issue
Block a user