| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title>CSS Values and Units Test: attr() in ::placeholder pseudo element</title> |
| <link rel="author" title="Swarup Ukil" href="mailto:sukil@mozilla.com"> |
| <link rel="help" href="https://drafts.csswg.org/css-values/#attr-notation"> |
| <link rel="match" href="attr-pseudo-element-placeholder-ref.html"> |
| <style> |
| input::placeholder { color: rgb(0, attr(data number, 0), 0);} |
| </style> |
| <input id="input" placeholder="Text" data="128"/> |
| <script> |
| const input = document.getElementById("input"); |
| input.getBoundingClientRect(); |
| input.setAttribute("data", "255"); |
| </script> |