-
Notifications
You must be signed in to change notification settings - Fork 715
[mediaqueries-4] make explicit that pointer
, hover
, any-pointer
, any-hover
relate only to pointing devices
#973
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
[mediaqueries-4] make explicit that pointer
, hover
, any-pointer
, any-hover
relate only to pointing devices
#973
Conversation
As `pointer`, `hover`, `any-pointer`, `any-hover` are only concerned with pointing devices, don't use the more generic/all-encompassing "input mechanism" (as that *would* cover things like keyboard, d-pads, etc) Also includes some very minor tweaks/corrections to existing wording/formatting
While in #967 i proposed "pointer-based input mechanisms", i saw that the spec already used "pointing devices" as a phrase, so for consistency went with this one... |
OT: So is iOS-Safari not behaving strict to the spec when it render elements you tap onto as having |
yours is a question more generally about the spec, and not about something in this PR, but: iOS uses heuristics to make see https://drafts.csswg.org/mediaqueries-4/#hover in reference to
iOS' faked hovering would fall under this category. In any case, this spec does not say either way when user agents should or shouldn't apply |
OT/Noise: Maybe it could be helpful for the future to specify that touch-only (without 3d-touch / pressing sensitivity at least) devices are no pointing devices (as there is no real way to distinquish between pointing and clicking/tapping)... The spec you are correcting also speaks about multiple devices. It should trigger However it would be great to have |
i think you're misunderstanding how the term "pointing device" is used here in the spec (and elsewhere, such as in https://w3c.github.io/pointerevents/). nothing to do with "pointing" as separate from potential activation. If you do want to propose a new distinction/value for the media features here, i'd suggest opening a new issue. Lastly, this spec does not deal with defining pseudo-classes like |
Thanks for clarification! and the link to pointerevents |
as much as i hate pestering... @frivoal does this look ok to merge (based on your positive comment #967 (comment)) ? |
bumping this for @tabatkins' consideration as well... |
Looks pretty reasonable to me. @frivoal, any objections to merging? |
This is probably good, but I wonder: this is fine for This is possibly enough of a corner case not to matter, but I am not sure. |
mediaqueries/Overview.bs
Outdated
User Agents may also decide to dynamically change what type of input is deemed to be primary, | ||
the number and type of pointing devices available, | ||
and a notion of which of these is generally and/or currently being used. | ||
User Agents may also decide to dynamically change what type of pointing device is deemed to be primary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could add an extra example right here: "In situations where the primary input mechanism for a device is not a pointing device, but there is a secondary – and less frequently used – input that is a pointing devices, the user agent may decide to keep treating the non-pointing device as the primary (resulting in pointer: none
), or they may opt to "promote" the secondary input to be identified as the primary pointing device (resulting in pointer: fine
or pointer: coarse
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I'd shorten it to this:
In situations where the primary input mechanism for a device is not a pointing device, but there is a secondary – and less frequently used – input that is a pointing devices, the user agent may decide to treat the non-pointing device as the primary (resulting in pointer: none
).
If you can update the pull request with that, I'll merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Agree the terse versions works just as well.
i'd say that's the remit of the UA to decide in that case. i'd tend to lean towards "if the UA deems the keyboard to be the primary input mechanism, and the gamepad is only used very infrequently, then there's no primary pointer, but only an basically...up to the UA, and this spec won't say what's right and it's up to the UA. or is that too handwavy? |
urgh, i seem to have completely messed up this pr by doing a rebase. let me see if i can fix that... |
22c2c31
to
c10bef8
Compare
Clarifies that it's again up to the UA to decide what to do in these situations.
[mediaqueries-4] Merge pull request w3c/csswg-drafts#973 from patrickhlauke/mq4-pointer-hover-clarify-input-is-pointer w3c/csswg-drafts@d68b77b2c0cc706e3bc70f0192f8e ae181be328d Minor fix: change "User Agent" to "user agent" w3c/csswg-drafts@11a6689aa1317e505a082307b9cdf e95ec1a9de4 Minor typo "plaing" > "placing" (#1113) w3c/csswg-drafts@53830b6c785db8cd72d06862561f7 cee646f6f48 Cover edge-case: primary input not pointer, secondary pointer w3c/csswg-drafts@f350190fbfe8d33c84133d8dacdb9 a54f3fb59a6
Closes #967