Find placeholder pseudo style in google chrome dev

2019-08-19 23:44发布

问题:

I want to test my placeholder style in chrome devtools but can't find it.

I tried to use the "Toggle Element State" but it provides only

  1. :hover
  2. :active
  3. :focus-within
  4. :focus
  5. :visited

These are my css lines:

    .inputs-wrapper input[type="text"]::placeholder ,
    .inputs-wrapper input[type="tel"]::placeholder{

        font-weight:900;
        color:black;

    }

html:

<div class="inputs-wrapper">
    <input type="text" placeholder="שם מלא"/>
    <input type="tel" placeholder="טלפון"/>
    <input type="submit" value="המשך > " />
</div>

回答1:

Showing user agent Shadow DOM does the trick.

After enabling this setting, expand the #shadow-root section. The placeholder shows up as a div.