Skip to content

Commit 9c4571f

Browse files
committed
[css-pseudo-4] Cross-link to :placeholder-shown, note request to make ::placeholder apply to certain option elements. w3c#2517
1 parent 3eba53b commit 9c4571f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

css-pseudo-4/Overview.bs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,13 @@ Placeholder Input: the ''::placeholder'' pseudo-element</h3>
736736
might have the placeholder text “YYYY/MM/DD”
737737
to clarify that numeric dates are to be entered in year-month-day order.
738738

739+
Note: There also exists a '':placeholder-shown'' pseudo-<em>class</em>,
740+
which applies to (real) elements while they are showing placeholder text,
741+
and can be used to style such elements specially.
742+
''::placeholder'' specifically selects
743+
a pseudo-element representing the placeholder <em>text</em>,
744+
and is thus relatively limited in its abilities.
745+
739746
All properties that apply to the ''::first-line'' pseudo-element
740747
also apply to the ''::placeholder'' pseudo-element.
741748

@@ -748,6 +755,12 @@ Placeholder Input: the ''::placeholder'' pseudo-element</h3>
748755
Issue: Authors seem to want 'text-align' on the list of supported properties.
749756
See e.g. <a href="http://css-tricks.com/almanac/selectors/p/placeholder/">comments here</a>.
750757

758+
Note: It's been requested that ''::placeholder'' also refer to
759+
a placeholder which has a corresponding element in the element tree.
760+
It's not clear how this should work, but it may be worth doing.
761+
See <a href="https://github.com/w3c/csswg-drafts/issues/2517">Issue 2417</a>.
762+
763+
751764
<h2 id="interactions">
752765
Overlapping Pseudo-element Interactions</h2>
753766

0 commit comments

Comments
 (0)