Re: [mediaqueries4]Differentiating touchscreen+mouse from touchscreen only scenarios

[people using Outlook - please format your emails in plaintext.
Outlook screws everything up *really bad*. ^_^
http://wiki.csswg.org/tools/www-style ]

On Fri, Apr 25, 2014 at 2:58 PM, Oren Freiberg
<oren.freiberg@microsoft.com> wrote:
> One concern I have with supporting both that a team member brought up is
> that media features are said to behave like CSS properties. CSS properties
> have a single value. So media features should also have a single value. The
> point of the values being drawn from a set is that the items in the set
> should be mutually exclusive. If we take a look at every other discrete
> feature, the sets of things are mutually exclusive: {dim, normal, washed}
> {enabled, initial-only, none} {none, on-demand, hover} {none, slow, normal},
> etc.

MQs and properties share a similar syntax, but they don't quite act
similar.  MQs are providing tests that need to be satisfied;
properties provide instructions on how to format a document.

MQs don't necessarily have a single value; especially, any of the
"range" type MQs can be true for lots of values - "(min-width: 600px)"
is true if the viewport width is *anything >= 600px*.

The fact that all the keyword MQs have mutually exclusive values so
far isn't thus a necessary aspect, just an incidental one.

> Because of this I think we should add a new value like ‘hybrid’  which
> address that concern, getting mobile content on ‘coarse’ and is easy for web
> developers to understand. On ‘hybrid’ provide the user the choice where on
> ‘coarse’ do touch only and ‘fine’ optimize for mouse.

We also thought of this but rejected it.  Using a special value for
"both" means that anyone who designs a stylesheet for "course" or
"fine" will *not* match this value.

Sure, it's possible for people to have styles for both "(pointer:
coarse)" and "(pointer: fine)" that fight, but I think most of the
time the styles'll work fine, and letting people naively apply their
"(pointer: coarse)" styles on a "hybrid" device will be fine.  People
can do more intelligent things if they want by testing for both of
them, of course.

~TJ

Received on Friday, 25 April 2014 22:39:36 UTC