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

± > 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