input range problem
Hello guys..,
I have this input range, and i am trying to make the box shadow of the thumb starting from rtl instead of ltr as shown in the image.
Here is the css code:
//input[type="range"] {
color: #9d8e5f;
--thumb-height: 11px;
--track-height: 4px;
--track-color: #e2dbc3;
--thumb-color: #9d8e5f; /* Define separate color for the thumb /
--brightness-hover: 180%;
--brightness-down: 80%;
--clip-edges: 0.125em;
position: relative;
background: transparent;
overflow: hidden;
cursor: pointer;
}
/ === WebKit specific styles === */
input[type="range"],
input[type="range"]::-webkit-slider-runnable-track,
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
transition: all ease 100ms;
height: var(--thumb-height);
}
input[type="range"]::-webkit-slider-runnable-track {
background: linear-gradient(var(--track-color) 0 0) scroll no-repeat center /
100% calc(var(--track-height) + 1px);
}
input[type="range"]::-webkit-slider-thumb {
--thumb-radius: calc((var(--thumb-height) * 0.5) - 1px);
--clip-top: calc((var(--thumb-height) - var(--track-height)) * 0.5 - 0.5px);
--clip-bottom: calc(var(--thumb-height) - var(--clip-top));
--clip-further: calc(100% + 1px);
width: var(--thumb-width, var(--thumb-height));
border-radius: 50%;
position: relative;
background: linear-gradient(currentColor 0 0) scroll no-repeat left center /
50% calc(var(--track-height) + 1px);
background-color: currentColor;
filter: brightness(100%);
--box-fill: calc(-100vmax - var(--thumb-width, var(--thumb-height))) 0 0
100vmax currentColor;
box-shadow: var(--box-fill);
clip-path: polygon(
100% -1px,
var(--clip-edges) -1px,
0 var(--clip-top),
-100vmax var(--clip-top),
-100vmax var(--clip-bottom),
0 var(--clip-bottom),
var(--clip-edges) 100%,
var(--clip-further) var(--clip-further)
);
}
//
0 Replies