Re: [csswg-drafts] [css-mediaqueries-4] any-hover:none is slightly pointless in current implementation? (#5462)

digging through some old stuff, i see i made a similar case aeons ago https://github.com/w3c/csswg-drafts/issues/841 - seem to have forgotten about it. the main point though still remains for me: `any-hover:none` seems very limited in that it only lets you detect that *none* of the pointers are hover capable. being able to know if *at least one* pointer isn't hover capable seems to me a much more valuable piece of information - then, as an author, I could decide (very defensively) to avoid any `:hover` type stuff altogether (as the user *may* start using that pointer that is non-hover capable). and of course, I can always do the opposite and, with the way `any-hover:hover` is currently already evaluated, check if at least one *is* hover-capable and decide that yes, I do want to provide `:hover` stuff then. I could even take the primary `hover:hover` into account in this scenario and decide even more strongly to do some hover stuff if the "primary" is hover capable.

```
@media (hover:hover) {
  /* the primary is hover capable ... depending on how much i trust the user to just stick to mainly the primary input, I can "safely" rely on hover stuff */
}

@media (hover:none) and (any-hover:hover) {
  /* ok, primary input can't hover, but some other input that's there can ... maybe cautiously still use hover? */
}

@media (any-hover:none) {
  /* clear-cut - none of the inputs support hover, so don't bother doing anything hover-related */
}
```

in the above, what's missing to me would be to be able to determine when the primary has hover capability *but* at least one other pointer input *doesn't*. that information is currently not available / queriable at all. this would basically allow me to not rely on that first determination just based on `hover:hover` (and rewrite the last one as a negative test). as one of the arguments against this was that this breaks the meaning of `none` ... let's for the sake of argument invent a new value `any-hover:mixed` or something.

```
@media (hover:hover) and not(any-hover:mixed) {
  /* the primary is hover capable, and there are no other pointers that don't have hover capability. they can all hover. safe to use hover stuff? */
}

@media (hover:hover) and (any-hover:mixed) {
  /* the primary is hover capable, but there's at least one pointer that isn't. maybe hold back on using hover, as the user might switch to that other pointer and find they can't use/operate my content if it relies on hover */
}

@media (hover:none) and (any-hover:hover) {
  /* ok, primary input can't hover, but some other input that's there can ... maybe cautiously still use hover? */
}

@media not(any-hover:hover) {
  /* clear-cut - none of the inputs support hover, so don't bother doing anything hover-related */
}
```


-- 
GitHub Notification of comment by patrickhlauke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5462#issuecomment-681204351 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 27 August 2020 01:13:03 UTC