Skip to content

Commit 3a1a8db

Browse files
committed
[css-pseudo] Add in ::placeholder, per old WG resolution.
1 parent 1a67198 commit 3a1a8db

File tree

2 files changed

+134
-171
lines changed

2 files changed

+134
-171
lines changed

css-pseudo/Overview.bs

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,13 @@ Security Considerations</h3>
607607
must prevent pages from being able to read
608608
the styling of such highlighted segments.
609609

610-
<h2 id="generated-content">
611-
Generated Content Pseudo-elements: ''::before'' and ''::after''</h2>
610+
<h2 id="treelike">
611+
Tree-Abiding Pseudo-elements</h2>
612+
613+
These pseudo-elements always fit within the box tree.
614+
615+
<h3 id="generated-content">
616+
Generated Content Pseudo-elements: ''::before'' and ''::after''</h3>
612617

613618
When their computed 'content' value is not ''content/none'',
614619
these pseudo-elements generate boxes
@@ -652,7 +657,40 @@ Generated Content Pseudo-elements: ''::before'' and ''::after''</h2>
652657
(<code>:before</code> and <code>:after</code>)
653658
for these pseudo-elements.
654659

655-
<h2 id="interactions">Overlapping Pseudo-element Interactions</h2>
660+
<h3 id="placeholder-pseudo">
661+
Placeholder Input: the ''::placeholder'' pseudo-element</h3>
662+
663+
The <dfn>::placeholder</dfn> pseudo-element represents
664+
placeholder text in an input field:
665+
text that represents the input
666+
and provides a hint to the user on how to fill out the form.
667+
For example, a date-input field
668+
might have the placeholder text “YYYY/MM/DD”
669+
to clarify that numeric dates are to be entered in year-month-day order.
670+
671+
All properties that apply to the ''::first-line'' pseudo-element
672+
also apply to the ''::placeholder'' pseudo-element.
673+
674+
In interactive media, placeholder text is often hidden once the user has entered input;
675+
however this is not a requirement, and both the input value and the placeholder text may be visible simultaneously.
676+
The exact behavior is UA-defined.
677+
Note that in static media (such as print)
678+
placeholder text will be present even after the user has entered input.
679+
680+
Issue: Current bikeshedding, based on implementations and discussions,
681+
appears to select from the list
682+
<code>::placeholder</code>,
683+
<code>::placeholder-text</code>,
684+
<code>::input-placeholder</code>.
685+
The WG is going with <code>::placeholder</code>.
686+
If there are other opinions that provide some kind of argument to the contrary,
687+
they should go to <a href="http://lists.w3.org/Archives/Public/www-style/">www-style@w3.org</a>.
688+
689+
Issue: Authors seem to want 'text-align' on the list of supported properties.
690+
See e.g. <a href="http://css-tricks.com/almanac/selectors/p/placeholder/">comments here</a>.
691+
692+
<h2 id="interactions">
693+
Overlapping Pseudo-element Interactions</h2>
656694

657695
<div class="example" id="overlapping-example">
658696
Recall that

0 commit comments

Comments
 (0)