Skip to content

Commit 125e855

Browse files
committed
Add :valid-drop-target.
1 parent b80f5ba commit 125e855

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

selectors4/Overview.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ <h2 class="no-num no-toc" id=contents>Table of Contents</h2>
276276

277277
<li><a href="#focus-pseudo"><span class=secno>8.3. </span> The input
278278
focus pseudo-class ‘<code class=css>:focus</code></a>
279+
280+
<li><a href="#the-valid-drop-target-pseudo"><span class=secno>8.4.
281+
</span> The drag-and-drop pseudo-class
282+
<code>:valid-drop-target</code></a>
279283
</ul>
280284

281285
<li><a href="#time-pseudos"><span class=secno>9. </span> Time-dimensional
@@ -2432,6 +2436,29 @@ <h3 id=focus-pseudo><span class=secno>8.3. </span> The input focus
24322436
<p>There may be document language or implementation specific limits on
24332437
which elements can acquire <code>:focus</code>.
24342438

2439+
<h3 id=the-valid-drop-target-pseudo><span class=secno>8.4. </span> The
2440+
drag-and-drop pseudo-class <a
2441+
href="#valid-drop-target-pseudo"><code>:valid-drop-target</code></a></h3>
2442+
2443+
<p> The <dfn id=valid-drop-target-pseudo>:valid-drop-target</dfn>
2444+
pseudo-class applies while an element is being hovered over, and is a
2445+
valid target for the current drag-and-drop operation, as defined by the
2446+
host language.
2447+
2448+
<p class=example> For example, <a href="#HTML5"
2449+
rel=biblioentry>[HTML5]<!--{{HTML5}}--></a> defines the <a
2450+
href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute"><code>dropzone</code></a>
2451+
attribute, which allows an author to declare an element as a "drop
2452+
target", and declare what kinds of data the element is willing to accept
2453+
from drag-and-drop.
2454+
2455+
<p> If a UA has alternate models of drag-and-drop, such as one based on
2456+
focusing elements, the <a
2457+
href="#valid-drop-target-pseudo"><code>:valid-drop-target</code></a>
2458+
pseudo-class must also match when such an element is interacted with such
2459+
that the user is about to drop into the element, such as when the
2460+
<code>:focus</code> pseudo-class applies.
2461+
24352462
<h2 id=time-pseudos><span class=secno>9. </span> Time-dimensional
24362463
Pseudo-classes</h2>
24372464

selectors4/Overview.src.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,27 @@ <h3 id="focus-pseudo">
17141714
<p>There may be document language or implementation specific limits on
17151715
which elements can acquire <code>:focus</code>.</p>
17161716

1717+
<h3 id='the-valid-drop-target-pseudo'>
1718+
The drag-and-drop pseudo-class <code>:valid-drop-target</code></h3>
1719+
1720+
<p>
1721+
The <dfn id='valid-drop-target-pseudo'>:valid-drop-target</dfn> pseudo-class
1722+
applies while an element is being hovered over,
1723+
and is a valid target for the current drag-and-drop operation,
1724+
as defined by the host language.
1725+
1726+
<p class='example'>
1727+
For example, [[HTML5]] defines the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute"><code>dropzone</code></a> attribute,
1728+
which allows an author to declare an element as a "drop target",
1729+
and declare what kinds of data the element is willing to accept from drag-and-drop.
1730+
1731+
<p>
1732+
If a UA has alternate models of drag-and-drop,
1733+
such as one based on focusing elements,
1734+
the <code>:valid-drop-target</code> pseudo-class must also match when such an element is interacted with
1735+
such that the user is about to drop into the element,
1736+
such as when the <code>:focus</code> pseudo-class applies.
1737+
17171738
<h2 id="time-pseudos">
17181739
Time-dimensional Pseudo-classes</h2>
17191740

0 commit comments

Comments
 (0)