-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-mediaqueries-4] any-hover:none is slightly pointless in current implementation? #5462
Comments
digging through some old stuff, i see i made a similar case aeons ago #841 - seem to have forgotten about it. the main point though still remains for me:
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
|
I agree with @patrickhlauke's proposal that there should be a simple way to determine if not all pointing devices support hover. The current spec alludes to this issue (emphasis added):
The problem is even worse than described here or in the spec: many browsers report a mouse-like "primary" pointing device ( The trigger for this is unreliable or incomplete data from the underlying platform about what the "primary" pointing device is, so browsers conflate signals and make incorrect assumptions. Rather than adding another state to
The result of these queries would not be connected to whether a device is in "tablet mode" or has an auto-rotation sensor (as
@media not(all-hover: hover) {
/* Don't require hover, because the user may not be able to do it, or,
the browser doesn't support the all-hover query */
}
@media (all-hover: hover) {
/* The user can definitely use hover, so :hover everything! */
} My expectation is that many more devices would report |
Coming in very late on this, but as I'm currently rewriting an old article on the topic of interaction media features...
As currently defined,
any-hover:none
will only ever evaluate to true when all of the detected pointer inputs are not hover-capable. This makes the query fairly useless in practice. From a developer's point of view, I'd want to know "am I safe to rely on the user being able to hover, or are there any inputs that the user may jump to that don't support this?" - at least I'd want to check this far more often than "is it impossible for the user, using any of the inputs at their disposal, to trigger the hover" (the latter would be accomplished simply by checkingany-hover:hover
... if that evaluates to false, I'd know that none of the inputs are hover capable).Is it far too late in the day now to ask for the behaviour of
any-hover:none
to be amended? basically, changing this so it can have multiple values evaluating to true...and make this includeany-hover:none
(so not making that the "union" of all hover capabilities, as is currently the case)./cc @frivoal
The text was updated successfully, but these errors were encountered: