Skip to content

Commit 2531440

Browse files
committed
[mediaqueries] Per WG discussion, restrict pointer/hover to just primary device, add any-pointer/any-hover as the union of all devices.
1 parent 65703e4 commit 2531440

2 files changed

Lines changed: 66 additions & 27 deletions

File tree

mediaqueries/Overview.bs

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,20 +1369,20 @@ pointer</h3>
13691369

13701370
The 'pointer' media feature is used to query about the presence and accuracy of a pointing device such as a mouse.
13711371
If a device has multiple input mechanisms,
1372-
it is recommended that the UA reports the characteristics of the least capable pointing device of the primary input mechanisms;
1373-
if there are multiple reasonable "primary" input mechanisms with different characteristics,
1374-
UAs may make the feature match multiple values.
1375-
This media query takes the following values:
1372+
the 'pointer' media feature must reflect the characteristics of the primary input mechanism,
1373+
as determined by the user agent.
1374+
(To query the capabilities of <em>any</em> available input mechanism,
1375+
see the 'any-pointer' media feature.)
13761376

13771377
<dl dfn-type=value dfn-for="@media/pointer">
13781378
<dt><dfn>none</dfn>
1379-
<dd>The input mechanism of the device does not include a pointing device.
1379+
<dd>The primary input mechanism of the device does not include a pointing device.
13801380

13811381
<dt><dfn>coarse</dfn>
1382-
<dd>The input mechanism of the device includes a pointing device of limited accuracy.
1382+
<dd>The primary input mechanism of the device includes a pointing device of limited accuracy.
13831383

13841384
<dt><dfn>fine</dfn>
1385-
<dd>The input mechanism of the device includes an accurate pointing device.
1385+
<dd>The primary input mechanism of the device includes an accurate pointing device.
13861386
</dl>
13871387

13881388
Both ''coarse'' and ''fine'' indicate the presence of a pointing device,
@@ -1459,8 +1459,12 @@ hover</h3>
14591459
Type: discrete
14601460
</pre>
14611461

1462-
The 'hover' media feature is used to query whether primary pointing system
1463-
used on the output device can hover or not.
1462+
The 'hover' media feature is used to query the user's ability to hover over elements on the page.
1463+
If a device has multiple input mechanisms,
1464+
the 'hover' media feature must reflect the characteristics of the “primary” input mechanism,
1465+
as determined by the user agent.
1466+
(To query the capabilities of <em>any</em> available input mechanism,
1467+
see the 'any-hover' media feature.)
14641468

14651469
<dl dfn-type=value dfn-for="@media/hover">
14661470
<dt><dfn>none</dfn>
@@ -1480,10 +1484,6 @@ hover</h3>
14801484
Indicates that the primary pointing system can easily hover over parts of the page.
14811485
</dl>
14821486

1483-
If a device has multiple pointing devices,
1484-
some of which support hovering and some of which not,
1485-
it is recommended that the UA reports the hovering ability of the least capable of the primary pointing devices.
1486-
14871487
<div class='example'>
14881488
For example, on a touch screen device that can also be controlled by an optional mouse,
14891489
the 'hover' <a>media feature</a> should match ''hover/none'',
@@ -1510,6 +1510,28 @@ hover</h3>
15101510
</pre>
15111511
</div>
15121512

1513+
<h3 id='any-input'>
1514+
any-pointer and any-hover</h3>
1515+
1516+
<pre class='descdef mq'>
1517+
Name: any-pointer
1518+
Value: none | coarse | fine
1519+
For: @media
1520+
Type: discrete
1521+
</pre>
1522+
1523+
<pre class='descdef mq'>
1524+
Name: any-hover
1525+
Value: none | on-demand | hover
1526+
For: @media
1527+
Type: discrete
1528+
</pre>
1529+
1530+
The 'any-pointer' and 'any-hover' media features are identical to the 'pointer' and 'hover' media features,
1531+
but they correspond to the union of capabilities of all the input devices available to the user.
1532+
More than one of their values can match,
1533+
if different input devices have different characteristics.
1534+
15131535

15141536
<h2 id='mf-environment'>
15151537
Environment Media Features</h2>

mediaqueries/Overview.html

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
160160
<li><a href=#mf-interaction><span class=secno>7</span> Interaction Media Features</a>
161161
<ul class=toc>
162162
<li><a href=#pointer><span class=secno>7.1</span> pointer</a>
163-
<li><a href=#hover><span class=secno>7.2</span> hover</a></ul>
163+
<li><a href=#hover><span class=secno>7.2</span> hover</a>
164+
<li><a href=#any-input><span class=secno>7.3</span> any-pointer and any-hover</a></ul>
164165
<li><a href=#mf-environment><span class=secno>8</span> Environment Media Features</a>
165166
<ul class=toc>
166167
<li><a href=#light-level><span class=secno>8.1</span> light-level</a></ul>
@@ -1785,20 +1786,20 @@ <h3 class="heading settled heading" data-level=7.1 id=pointer><span class=secno>
17851786

17861787
<p>The <a class=property data-link-type=propdesc href=#descdef-pointer title=pointer>pointer</a> media feature is used to query about the presence and accuracy of a pointing device such as a mouse.
17871788
If a device has multiple input mechanisms,
1788-
it is recommended that the UA reports the characteristics of the least capable pointing device of the primary input mechanisms;
1789-
if there are multiple reasonable "primary" input mechanisms with different characteristics,
1790-
UAs may make the feature match multiple values.
1791-
This media query takes the following values:</p>
1789+
the <a class=property data-link-type=propdesc href=#descdef-pointer title=pointer>pointer</a> media feature must reflect the characteristics of the primary input mechanism,
1790+
as determined by the user agent.
1791+
(To query the capabilities of <em>any</em> available input mechanism,
1792+
see the <a class=property data-link-type=propdesc href=#descdef-any-pointer title=any-pointer>any-pointer</a> media feature.)</p>
17921793

17931794
<dl data-dfn-for=@media/pointer data-dfn-type=value>
17941795
<dt><dfn class=css-code data-dfn-for=@media/pointer data-dfn-type=value data-export="" id=valuedef-none3>none<a class=self-link href=#valuedef-none3></a></dfn>
1795-
<dd>The input mechanism of the device does not include a pointing device.
1796+
<dd>The primary input mechanism of the device does not include a pointing device.
17961797

17971798
<dt><dfn class=css-code data-dfn-for=@media/pointer data-dfn-type=value data-export="" id=valuedef-coarse>coarse<a class=self-link href=#valuedef-coarse></a></dfn>
1798-
<dd>The input mechanism of the device includes a pointing device of limited accuracy.
1799+
<dd>The primary input mechanism of the device includes a pointing device of limited accuracy.
17991800

18001801
<dt><dfn class=css-code data-dfn-for=@media/pointer data-dfn-type=value data-export="" id=valuedef-fine>fine<a class=self-link href=#valuedef-fine></a></dfn>
1801-
<dd>The input mechanism of the device includes an accurate pointing device.
1802+
<dd>The primary input mechanism of the device includes an accurate pointing device.
18021803
</dl>
18031804

18041805
<p>Both <a class=css data-link-type=maybe href=#valuedef-coarse title=coarse>coarse</a> and <a class=css data-link-type=maybe href=#valuedef-fine title=fine>fine</a> indicate the presence of a pointing device,
@@ -1863,8 +1864,12 @@ <h3 class="heading settled heading" data-level=7.2 id=hover><span class=secno>7.
18631864

18641865
<table class="definition descdef mq" data-dfn-for=@media><tr><th>Name:<td><dfn class=css-code data-dfn-for=@media data-dfn-type=descriptor data-export="" id=descdef-hover>hover<a class=self-link href=#descdef-hover></a></dfn><tr><th>For:<td><a class=css-code data-link-type=at-rule href=http://dev.w3.org/csswg/css-conditional-3/#at-ruledef-media title=@media>@media</a><tr><th>Value:<td class=prod>none <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> on-demand <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> hover<tr><th>Type:<td>discrete</table>
18651866

1866-
<p>The <a class=property data-link-type=propdesc href=#descdef-hover title=hover>hover</a> media feature is used to query whether primary pointing system
1867-
used on the output device can hover or not.</p>
1867+
<p>The <a class=property data-link-type=propdesc href=#descdef-hover title=hover>hover</a> media feature is used to query the user’s ability to hover over elements on the page.
1868+
If a device has multiple input mechanisms,
1869+
the <a class=property data-link-type=propdesc href=#descdef-hover title=hover>hover</a> media feature must reflect the characteristics of the “primary” input mechanism,
1870+
as determined by the user agent.
1871+
(To query the capabilities of <em>any</em> available input mechanism,
1872+
see the <a class=property data-link-type=propdesc href=#descdef-any-hover title=any-hover>any-hover</a> media feature.)</p>
18681873

18691874
<dl data-dfn-for=@media/hover data-dfn-type=value>
18701875
<dt><dfn class=css-code data-dfn-for=@media/hover data-dfn-type=value data-export="" id=valuedef-none4>none<a class=self-link href=#valuedef-none4></a></dfn>
@@ -1884,10 +1889,6 @@ <h3 class="heading settled heading" data-level=7.2 id=hover><span class=secno>7.
18841889
Indicates that the primary pointing system can easily hover over parts of the page.
18851890
</dl>
18861891

1887-
<p>If a device has multiple pointing devices,
1888-
some of which support hovering and some of which not,
1889-
it is recommended that the UA reports the hovering ability of the least capable of the primary pointing devices.</p>
1890-
18911892
<div class=example>
18921893
For example, on a touch screen device that can also be controlled by an optional mouse,
18931894
the <a class=property data-link-type=propdesc href=#descdef-hover title=hover>hover</a> <a data-link-type=dfn href=#media-feature title="media feature">media feature</a> should match <a class=css data-link-for=hover data-link-type=maybe href=#valuedef-none4 title=none>none</a>,
@@ -1913,6 +1914,18 @@ <h3 class="heading settled heading" data-level=7.2 id=hover><span class=secno>7.
19131914
</pre>
19141915
</div>
19151916

1917+
<h3 class="heading settled heading" data-level=7.3 id=any-input><span class=secno>7.3 </span><span class=content>
1918+
any-pointer and any-hover</span><a class=self-link href=#any-input></a></h3>
1919+
1920+
<table class="definition descdef mq" data-dfn-for=@media><tr><th>Name:<td><dfn class=css-code data-dfn-for=@media data-dfn-type=descriptor data-export="" id=descdef-any-pointer>any-pointer<a class=self-link href=#descdef-any-pointer></a></dfn><tr><th>For:<td><a class=css-code data-link-type=at-rule href=http://dev.w3.org/csswg/css-conditional-3/#at-ruledef-media title=@media>@media</a><tr><th>Value:<td class=prod>none <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> coarse <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> fine<tr><th>Type:<td>discrete</table>
1921+
1922+
<table class="definition descdef mq" data-dfn-for=@media><tr><th>Name:<td><dfn class=css-code data-dfn-for=@media data-dfn-type=descriptor data-export="" id=descdef-any-hover>any-hover<a class=self-link href=#descdef-any-hover></a></dfn><tr><th>For:<td><a class=css-code data-link-type=at-rule href=http://dev.w3.org/csswg/css-conditional-3/#at-ruledef-media title=@media>@media</a><tr><th>Value:<td class=prod>none <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> on-demand <a class=prod-punc data-link-type=grammar href=http://dev.w3.org/csswg/css-values-3/#comb-one title=|>|</a> hover<tr><th>Type:<td>discrete</table>
1923+
1924+
<p>The <a class=property data-link-type=propdesc href=#descdef-any-pointer title=any-pointer>any-pointer</a> and <a class=property data-link-type=propdesc href=#descdef-any-hover title=any-hover>any-hover</a> media features are identical to the <a class=property data-link-type=propdesc href=#descdef-pointer title=pointer>pointer</a> and <a class=property data-link-type=propdesc href=#descdef-hover title=hover>hover</a> media features,
1925+
but they correspond to the union of capabilities of all the input devices available to the user.
1926+
More than one of their values can match,
1927+
if different input devices have different characteristics.</p>
1928+
19161929

19171930
<h2 class="heading settled heading" data-level=8 id=mf-environment><span class=secno>8 </span><span class=content>
19181931
Environment Media Features</span><a class=self-link href=#mf-environment></a></h2>
@@ -2411,6 +2424,8 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
24112424
Index</span><a class=self-link href=#index></a></h2>
24122425
<div data-fill-with=index><ul class=indexlist>
24132426
<li>all, <a href=#valuedef-all title="section 2.3">2.3</a>
2427+
<li>any-hover, <a href=#descdef-any-hover title="section 7.3">7.3</a>
2428+
<li>any-pointer, <a href=#descdef-any-pointer title="section 7.3">7.3</a>
24142429
<li>aspect-ratio, <a href=#descdef-aspect-ratio title="section 4.3">4.3</a>
24152430
<li>aural, <a href=#valuedef-aural title="section 2.3">2.3</a>
24162431
<li>boolean context, <a href=#boolean-context title="section 2.4.2">2.4.2</a>
@@ -2521,6 +2536,8 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class=
25212536
<tr><th scope-row=""><a class=css-code data-link-type=descriptor href=#descdef-monochrome title=monochrome>monochrome</a><td>&lt;integer&gt;<td><td>range
25222537
<tr><th scope-row=""><a class=css-code data-link-type=descriptor href=#descdef-pointer title=pointer>pointer</a><td>none | coarse | fine<td><td>discrete
25232538
<tr><th scope-row=""><a class=css-code data-link-type=descriptor href=#descdef-hover title=hover>hover</a><td>none | on-demand | hover<td><td>discrete
2539+
<tr><th scope-row=""><a class=css-code data-link-type=descriptor href=#descdef-any-pointer title=any-pointer>any-pointer</a><td>none | coarse | fine<td><td>discrete
2540+
<tr><th scope-row=""><a class=css-code data-link-type=descriptor href=#descdef-any-hover title=any-hover>any-hover</a><td>none | on-demand | hover<td><td>discrete
25242541
<tr><th scope-row=""><a class=css-code data-link-type=descriptor href=#descdef-light-level title=light-level>light-level</a><td>dim | normal | washed<td><td>discrete
25252542
<tr><th scope-row=""><a class=css-code data-link-type=descriptor href=#descdef-scripting title=scripting>scripting</a><td>none | initial-only | enabled<td><td>discrete</table></div>
25262543

0 commit comments

Comments
 (0)