- From: Wes Johnston <wjohnston@mozilla.com>
- Date: Sat, 17 Nov 2012 09:14:50 -0800
- To: www-style@w3.org
It would be nice when interacting with web pages in touch or pen based environments if there were easy ways to style objects based on whether they are currently being touched or perhaps if they were touched in the last touch session on the screen. I'd like to propose two potential selectors for these situations: 1.) :touching for when an element is actively being touched on the screen. Unlike targets in the touchevents spec, this should actively change as the user moves their finger on the screen. As soon as a user lifts their finger from the screen these selectors would no longer match. One potential use case for this is something like an onscreen keyboard where you want the keys to light up as the user drags their finger on the keyboard. This could also be helpful as a means of providing quick feedback about what is being touched on screen (i.e. tap highlights). 2.) :touched to match the elements that are actively being touched, or elements that were being touched the last time a finger was on the screen. The use case I want to address here are things like drop down menus, where you would likely want them to remain visible on screen even after the users finger has been lifted, but to disappear if the user touches outside the menu. The selector should be removed as soon as another touch starts, ends or moves on the document (i.e. if two fingers are on the screen and one is lifted, the selector should match until the second finger moves or another finger touches the document). In both cases, the selectors should stop matching if the system starts performing any system actions on the page (such as scrolling). Apologies if I'm doing something incorrectly here. Its my first email to a working group. Thoughts? - Wes
Received on Saturday, 17 November 2012 17:15:30 UTC