Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see the style of the thumb of range input in Chrome developer tools?

I am using materialize css for my website and currently I am trying to change the style of the thumb of the range input (i.e. The thing you click and hold to change the value of the slide bar)

And when changing sytle, I would like to change value on Chrome developer tools first to see how it looks before making the change in my CSS. However, I can only find the style for the range input in developer tools but not the style for the thumb. Is there a way I can see the style of the thumb in Chrome developer tools?


P.S. Mainly the HTML5 range input. The noUISlider is created by Javascript and it is visible on developer tools. Sorry that there is no id for the HTML5 range input so I can only link to to header nearest to it.

like image 524
cytsunny Avatar asked Oct 27 '16 02:10

cytsunny


People also ask

How do you style range input?

To style the range input with CSS you'll need to apply styles to two pseudo-elements: ::-webkit-slider-thumb and ::-webkit-slider-runnable-track . Find out how you can apply custom styling and make the range input more functional and appealing. Contents of the article: CSS selectors for the range input.

How do I customize Chrome developer tools?

Goto chrome://flags/#enable-devtools-experiments , and enable Developer Tools experiments . Select Relaunch Now at the bottom of the page. F12 to Open developer tools, go to Settings , select Experiments tab, and check Allow custom UI themes .

What is Webkit slider thumb?

The ::-webkit-slider-thumb CSS pseudo-element represents the "thumb" that the user can move within the "groove" of an <input> of type="range" to alter its numerical value.


2 Answers

You can enable View Shadow DOM in DevTools console and view styles associated with Shadow DOM elements.

Hit

F12 > F1 to open DevTools >> Settings >> Preferences

You will find the option under Elements as Show user agent shadow DOM


Shadow DOM DevTools

like image 84
AA2992 Avatar answered Sep 22 '22 02:09

AA2992


Just want to add onto the accepted answer as UI has changed substantially since the original question was asked and to add a visual aspect:

step 1

enter image description here

like image 36
Abdi Avatar answered Sep 22 '22 02:09

Abdi