ladybird/Tests/LibWeb/Ref/css-placeholder-shown-selector.html
Sam Atkins 7bc5949e35 LibWeb: Implement the :placeholder-shown pseudo-class
This matches if the element has a placeholder, and that placeholder is
currently visible. This applies to `<input>` and `<textarea>` elements,
but our `<textarea>` is very limited so does not support placeholders.
2023-08-23 05:30:59 +02:00

9 lines
230 B
HTML

<style>
:placeholder-shown {
background-color: yellow;
}
</style>
<input type="text" placeholder="hi">
<input type="text" placeholder="hi" value="I like turtles">
<input type="text">
<input type="text" value="I like turtles">