[csswg-drafts] [selectors] :drop() should not be a petition function

Crissov has just created a new issue for https://github.com/w3c/csswg-drafts:

== [selectors] :drop() should not be a petition function ==
[Changes](https://www.w3.org/TR/2018/WD-selectors-4-20180201/#changes):

> Changed the `:active-drop-target`, `:valid-drop-target`, `:invalid-drop-target` with [`:drop()`](https://www.w3.org/TR/2018/WD-selectors-4-20180201/#drag-pseudos).

Selectors and values should (and usually do) use function syntax with parameters inside parentheses only if the possible parameters …

- cannot be enumerated, e.g. `calc()` and `:nth-child()` or
- are an open set controlled outside CSS, e.g. ISO 639 / BCP 47 language codes in `:lang()`.

This selector, however, accepts only three optional keywords as its parameters which can be combined into just 6 canonically equivalent ways (since `valid` and `invalid` are mutually exclusive), one of which is already covered by a pseudo-class selector and two of which can be expressed by chained selectors:

    :drop( [ active || valid || invalid ]? ) 

- `:drop()` = `:drop`
- `:drop(active)` (= `:active-drop-target`)
- `:drop(valid)` (= `:valid-drop-target`)
- `:drop(invalid)` (= `:invalid-drop-target`)
- `:drop(active valid)` = `:drop(valid active)` = `:drop(active):drop(valid)` = `:drop(valid):drop(active)` (= `:active-drop-target:valid-drop-target`)
- `:drop(active invalid)` = `:drop(invalid active)` = `:drop(active):drop(invalid)` = `:drop(invalid):drop(active)` (= `:active-drop-target:invalid-drop-target`)

The change therefore makes no apparent sense.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2256 using your GitHub account

Received on Friday, 2 February 2018 01:39:03 UTC