Skip to content

Commit 8c85af2

Browse files
committed
[selectors-4] Make :placeholder-shown clearly apply also when placeholder option lebel is shown per HTML. #2517
1 parent 9c4571f commit 8c85af2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

selectors-4/Overview.bs

+12-1
Original file line numberDiff line numberDiff line change
@@ -2494,7 +2494,18 @@ The Placeholder-shown Pseudo-class: '':placeholder-shown''</h4>
24942494
as a hint to the user on what to type in.
24952495
See, for example, the <code>placeholder</code> attribute in [[HTML5]].
24962496
The <dfn id="placeholder-shown-pseudo">:placeholder-shown</dfn> pseudo-class
2497-
matches an input element that is showing such placeholder text.
2497+
matches an input element that is showing such placeholder text,
2498+
whether that text is given by an attribute or a real element,
2499+
or is otherwise implied by the UA.
2500+
2501+
<div class="example">
2502+
For example, according to the semantics of [[HTML]]
2503+
the <{input/placeholder}> attribute on the <{input}> element
2504+
provide placeholder text,
2505+
as does the first <{option}> element of a <{select}> under certain conditions.
2506+
The '':placeholder-shown'' class thus applies
2507+
whenever such placeholder text is shown.
2508+
</div>
24982509

24992510
<h4 id="the-default-pseudo">
25002511
The Default-option Pseudo-class: '':default''</h4>

0 commit comments

Comments
 (0)