-
Same as in #6972, I don't know how I would go about styling the pseudo elements of a range type input slider, specifically it's thumb and track. input[type=range]::-webkit-slider-runnable-track,
input[type=range]::-ms-track,
input[type=range]::-moz-range-track{
/*stuff here*/
}
input[type=range]::-moz-range-thumb,
input[type=range]::-ms-thumb,
input[type=range]::-webkit-slider-thumb{
/*stuff here*/
} The tailwind doc doesn't mention anything about input elements in general from what I tried. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 16 replies
-
Hi @djkato, You can see all the pseudo classes included natively here: https://tailwindcss.com/docs/hover-focus-and-other-states#pseudo-class-reference. The range input pseudo classes aren't included. I think Tailwind likes to steer clear of non standard cases like this because it's a whole lot of nuance to support over time. For years the range input has been a strange hodge-podge of selectors across broweser. I'm sure it's something they would consider down the road if a specification emerged to make it consistent I've not tried it in all browsers, but I've noticed that Chrome based browsers are finicky when it comes to multiple selectors. Breaking them out into their own rule sets (like the examples you've shared) seems to help. |
Beta Was this translation helpful? Give feedback.
-
According to recent versions of Tailwind CSS, If you want, you can add these styles right inside your HTML file: |
Beta Was this translation helpful? Give feedback.
Hi @djkato,
You can see all the pseudo classes included natively here: https://tailwindcss.com/docs/hover-focus-and-other-states#pseudo-class-reference. The range input pseudo classes aren't included. I think Tailwind likes to steer clear of non standard cases like this because it's a whole lot of nuance to support over time. For years the range input has been a strange hodge-podge of selectors across broweser. I'm sure it's something they would consider down the road if a specification emerged to make it consistent
I've not tried it in all browsers, but I've noticed that Chrome based browsers are finicky when it comes to multiple selectors. Breaking them out into their own rule sets (lik…