Skip to content

Commit

Permalink
[selectors-4] Drop the :drop() pseudo-class, since HTML dropped its d…
Browse files Browse the repository at this point in the history
…eclarative support for drop zones. #2257
  • Loading branch information
fantasai committed Nov 15, 2018
1 parent a5d3306 commit 4446ec6
Showing 1 changed file with 2 additions and 51 deletions.
53 changes: 2 additions & 51 deletions selectors-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2338,57 +2338,6 @@ The Focus Container Pseudo-class: '':focus-within''</h3>
(including non-element nodes, such as text nodes)
matches the conditions for matching '':focus''.

<h3 id="drag-pseudos">
The Drop Target Pseudo-class: '':drop'' and '':drop()''</h3>

The <dfn>:drop</dfn> pseudo-class applies to all elements
that are drop targets,
as defined by the document language,
while the user is “dragging”
or otherwise conceptually carrying an item
to be “dropped”.

The <dfn id="selectordef-drop-function">:drop()</dfn> functional pseudo-class is identical to '':drop'',
but allows additional filters to be specified that can exclude some drop targets.
Its syntax is:

<pre class='prod'>:drop( [ active || valid || invalid ]? ) </pre>

The keywords have the following meanings:

<dl dfn-type="value" dfn-for=":drop()">
<dt><dfn>active</dfn>
<dd>
The drop target is the current drop target for the drag operation.
That is, if the user were to release the drag,
it would be dropped onto this drop target.

<dt><dfn>valid</dfn>
<dd>
If the document language has a concept of “valid” and “invalid” drop targets,
this only matches if the drop target is valid for the object currently being dragged.
Otherwise, it matches all drop targets.

For example, HTML's <code>dropzone</code> attribute can specify that the drop target only accepts strings or files that are set to a given type.

<dt><dfn>invalid</dfn>
<dd>
If the document language has a concept of “valid” and “invalid” drop targets,
this only matches if the drop target is invalid for the object currently being dragged.
Otherwise, it matches nothing.
</dl>

Multiple keywords can be combined in the argument,
representing only drop targets that satisfy all of the keywords.
For example, '':drop(valid active)'' will match the active drop target <em>if</em> it's valid,
but not if it's invalid.

If no keywords are given in the argument,
'':drop()'' has the same meaning as '':drop''--
it matches every drop target.

Issue: Turn <a href="http://forums.mozillazine.org/viewtopic.php?f=18&t=2633249">this scenario</a> into an example.

<h2 id="time-pseudos">
Time-dimensional Pseudo-classes</h2>

Expand Down Expand Up @@ -3926,6 +3875,8 @@ Changes</h2>
<li>Changed the specificity of '':is()'', '':where()'', and '':nth-child()''
to not depend on which selector argument matched.
(<a href="https://github.com/w3c/csswg-drafts/issues/1027">Issue 1027</a>)
<li>Dropped the '':drop()'' pseudo-classes since HTML dropped the related feature.
(<a href="https://github.com/w3c/csswg-drafts/issues/2257">Issue 2257</a>)
</ul>

Significant changes since the <a href="https://www.w3.org/TR/2013/WD-selectors4-20130502/">2 May 2013 Working Draft</a> include:
Expand Down

0 comments on commit 4446ec6

Please sign in to comment.