diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-11-30 22:15:12 -0500 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-12-01 11:18:11 -0500 |
commit | 4a30446999588cf9bf0feace9ebc4eb29b3eb73a (patch) | |
tree | 44fdb8af3e3a42f66eaee44c5926dce2188ba331 /Base | |
parent | fddbc2e3788797d62caf21f78868412d3ab4ad0b (diff) | |
download | serenity-4a30446999588cf9bf0feace9ebc4eb29b3eb73a.zip |
LibWeb: Support displaying HTMLInputElement placeholder values
This adds support for parsing the ::placeholder pseudo-element and
injecting an anonymous layout node with that element when the input
element's data is empty.
Diffstat (limited to 'Base')
-rw-r--r-- | Base/res/html/misc/input.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Base/res/html/misc/input.html b/Base/res/html/misc/input.html index b679713398..16ed67fe98 100644 --- a/Base/res/html/misc/input.html +++ b/Base/res/html/misc/input.html @@ -1,6 +1,23 @@ +<html> +<head> + <style type="text/css"> + #placeholder1, #placeholder2 { + color: red; + width: 250px; + } + + #placeholder1::placeholder { + color: green; + } + </style> +</head> + +<body> <p> <input type="hidden" id="hidden" value="hidden" /><br /> <input type="text" id="text" value="text" /><br /> + <input type="text" id="placeholder1" placeholder="This placeholder should be green" /><br /> + <input type="text" id="placeholder2" placeholder="This placeholder should be grey" /><br /> <input type="search" id="search" value="search" /><br /> <input type="tel" id="tel" value="tel" /><br /> <input type="url" id="url" value="url" /><br /> @@ -29,6 +46,8 @@ var ids = [ "hidden", "text", + "placeholder1", + "placeholder2", "search", "tel", "url", @@ -69,3 +88,5 @@ }); </script> +</body> +</html> |