interaction-with-placeholder.html (1110B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Shadow Parts - Interaction with placeholder</title> 5 <!-- This reftest exists because getComputedStyle for 6 ::placeholder is not implemented everywhere --!> 7 <meta href="mailto:fergal@chromium.org" rel="author" title="Fergal Daly"> 8 <link href="http://www.google.com/" rel="author" title="Google"> 9 <link href="https://drafts.csswg.org/css-shadow-parts/" rel="help"> 10 <link href="interaction-with-placeholder-ref.html" rel="match"> 11 <script src="support/shadow-helper.js"></script> 12 </head> 13 <body> 14 <style> 15 #c-e::part(placeholder-p)::placeholder { color: green; } 16 </style> 17 <script>installCustomElement("custom-element", "custom-element-template");</script> 18 <template id="custom-element-template"> 19 <style> 20 #placeholder-i::placeholder { color: red; } 21 </style> 22 <div> 23 The following text should be green: 24 <input id="placeholder-i" part="placeholder-p" placeholder="this text"></input> 25 </div> 26 </template> 27 <custom-element id="c-e"></custom-element> 28 </body> 29 </html>