mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +00:00
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.
This commit is contained in:
parent
9f5b1e6614
commit
7bc5949e35
5 changed files with 34 additions and 0 deletions
9
Tests/LibWeb/Ref/css-placeholder-shown-selector-ref.html
Normal file
9
Tests/LibWeb/Ref/css-placeholder-shown-selector-ref.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<style>
|
||||
.placeholder-shown {
|
||||
background-color: yellow;
|
||||
}
|
||||
</style>
|
||||
<input type="text" placeholder="hi" class="placeholder-shown">
|
||||
<input type="text" placeholder="hi" value="I like turtles">
|
||||
<input type="text">
|
||||
<input type="text" value="I like turtles">
|
Loading…
Add table
Add a link
Reference in a new issue