Fabio Manganiello on Nostr: I thought that in 2024 we would have had a simple answer to the question "if I have ...
I thought that in 2024 we would have had a simple answer to the question "if I have an <input type="range">, how do I apply a different style to the part of the slider before the thumb?"
I've been stumbling on this problem for the past decade, and there seems to be no solution yet.
On Firefox, it's quite straightforward. The `::-moz-range-progress` pseudo-element has been around for a while.
On Chrome and friends, for some sadistic reason that I'm still failing to understand, I still have to resort to ugly workarounds that involve stuff like `clip-path: polygon` on `::-webkit-slider-thumb`, because for some reason cool web engines have decided that web designers shouldn't bother to apply a different style to the progress in a slider.
The style that I've written in the Slider element of Platypush https://git.platypush.tech/platypush/platypush/src/branch/master/platypush/backend/http/webapp/src/components/elements/Slider.vue may be some of the ugliest CSS I've ever written in my life.
Oh, and let's not even get started with the issue of sliders with two thumbs and range values. I've decided to entirely give up writing a cross-browser implementation for that.
I've been stumbling on this problem for the past decade, and there seems to be no solution yet.
On Firefox, it's quite straightforward. The `::-moz-range-progress` pseudo-element has been around for a while.
On Chrome and friends, for some sadistic reason that I'm still failing to understand, I still have to resort to ugly workarounds that involve stuff like `clip-path: polygon` on `::-webkit-slider-thumb`, because for some reason cool web engines have decided that web designers shouldn't bother to apply a different style to the progress in a slider.
The style that I've written in the Slider element of Platypush https://git.platypush.tech/platypush/platypush/src/branch/master/platypush/backend/http/webapp/src/components/elements/Slider.vue may be some of the ugliest CSS I've ever written in my life.
Oh, and let's not even get started with the issue of sliders with two thumbs and range values. I've decided to entirely give up writing a cross-browser implementation for that.