W3C home > Mailing lists > Public > www-style@w3.org > August 2013

RE: [selectors4][naming] Naming the drag-and-drop pseudo-classes

From: François REMY <francois.remy.dev@outlook.com>
Date: Sat, 17 Aug 2013 22:13:05 -0700
Message-ID: <DUB404-EAS13681DCDDDC19C8FAA64761A5410@phx.gbl>
To: "'Brad Kemper'" <brad.kemper@gmail.com>, "'Tab Atkins Jr.'" <jackalmage@gmail.com>
CC: "'www-style list'" <www-style@w3.org>
± > 1. :current-drop / :valid-drop / :invalid-drop 2. :active-drop /
± > :valid-drop / :invalid-drop 3. :drop(active) / :drop(valid) /
± > :drop(invalid)
± You don't really need the parentheses in order to get the common word first,
± nor to make it extendable. You could just have:
± :drop-active / :drop-valid / :drop-invalid / :drop-whatever

It doesn't mean the same thing. The parenthesis help understand we're restricting the set of drop targets. It's like a pseudo-class in the pseudo-class. We could perfectly allow ":drop" to match all drop targets whatever their validity state, and ":drop(valid)" would filter all the invalid ones. That actually allows ":drop(invalid current)" for the case an user is currently over an invalid drop target, you may want to make it even more explicit the target is invalid.

While not using parentheses is syntaxically valid in CSS, it doesn't parse in my English-Pseudo-Code analyzer which is probably more important that the former, at least to me.

FWIW, I kinda like all the proposals the survey bubbled, so not trying to launch any specifc debate here ;-) I have concerns about :active-drop one because I know it would theorically break one of my code that looks for ":active" in selectors if it was used, but when I wrote the code, I already knew it was a bad idea not looking for a follow-up hyphen (and still laziness won).
Received on Sunday, 18 August 2013 05:13:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC