@abhik-b
Posted
Hello Mohamed , Your solution looks great & it is very responsive . Great Job done 💯
Just a opinion : Yes you are right , you do not need resize observer. Instead you can use responsive css media queries. What I did was :
- create a div
.slider-container
& made itposition:relative
. - Then created a
label
withwidth :90%;
so the label always has 90% width of the parent - Then created a input & hid it's appearance (you have also done the same. However I did not give any position to input , instead I gave it a bg color just like the original design
- Then I created a
.slider-handle
span &.slider-fill
span. As the name says 1 is for showing the custom fill & other for custom handle. - Then for large screens I used the css media queries to increase the handle size.
Here is my code
Hope this helps 🤞 & Please keep coding this nice solutions 🥳
Marked as helpful
@mohamedyasser27
Posted
@abhik-b a very nice solution and consistent i got dragged down the road of pseudo elements so i didn't try to make it custom so i had to resort to js but very nice thinking ️🔥
thanks a lot