Skip to content

Commit 42ccbe5

Browse files
committed
[mediaqueries] Change how resolution works on non-square pixels
1 parent f920338 commit 42ccbe5

2 files changed

Lines changed: 15 additions & 36 deletions

File tree

mediaqueries/Overview.bs

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,21 +1005,14 @@ resolution</h3>
10051005
Type: range
10061006
</pre>
10071007

1008-
The 'resolution' media feature describes the resolution of the output device,
1009-
i.e. the density of the pixels,
1010-
taking into account the <a spec=cssom-view>page zoom</a>
1011-
but assuming a <a spec=cssom-view>pinch zoom</a> of 1.0.
1012-
1013-
When querying devices with non-square pixels,
1014-
in 'min-resolution' queries the least-dense dimension must be compared to the specified value
1015-
and in 'max-resolution' queries the most-dense dimensions must be compared instead.
1016-
A 'resolution' query that's not evaluated in a <a>range context</a> never matches a device with non-square pixels.
1017-
1018-
<p class='issue'>
1019-
Figure out how to make the above work properly for &lt;/&gt; syntax.
1020-
Just translate it over directly?
1021-
That prevents you from doing a "less than/greater than" dichotomy without using ''not''.
1022-
Hmm.
1008+
The 'resolution' media feature describes the resolution of the output
1009+
device, i.e. the density of the pixels, taking into account the <a
1010+
spec=cssom-view>page zoom</a> but assuming a <a spec=cssom-view>pinch zoom</a>
1011+
of 1.0.
1012+
1013+
<p class="note"><<resolution>> does not refer to the number of physical dots physical length units, but to the number of physical dots per CSS unit
1014+
1015+
When querying media with non-square pixels, 'resolution' queries the density in the vertical dimension.
10231016

10241017
For printers, this corresponds to the screening resolution
10251018
(the resolution for printing dots of arbitrary color).

mediaqueries/Overview.html

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,21 +1422,13 @@ <h3 class="heading settled" data-level=5.1 id=resolution><span class=secno>5.1 <
14221422

14231423
<table class="definition descdef mq" data-dfn-for=@media><tr><th>Name:<td><dfn class=css data-dfn-for=@media data-dfn-type=descriptor data-export="" id=descdef-media-resolution>resolution<a class=self-link href=#descdef-media-resolution></a></dfn><tr><th>For:<td><a class=css 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><a class="production css" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#resolution-value title="<resolution>">&lt;resolution&gt;</a><tr><th>Type:<td>range</table>
14241424

1425-
<p>The <a class=property data-link-type=propdesc href=#descdef-media-resolution title=resolution>resolution</a> media feature describes the resolution of the output device,
1426-
i.e. the density of the pixels,
1427-
taking into account the <a data-link-spec=cssom-view data-link-type=dfn href=http://dev.w3.org/csswg/cssom-view-1/#page-zoom title="page zoom">page zoom</a>
1428-
but assuming a <a data-link-spec=cssom-view data-link-type=dfn href=http://dev.w3.org/csswg/cssom-view-1/#pinch-zoom title="pinch zoom">pinch zoom</a> of 1.0.</p>
1429-
1430-
<p>When querying devices with non-square pixels,
1431-
in <a class=property data-link-type=propdesc title=min-resolution>min-resolution</a> queries the least-dense dimension must be compared to the specified value
1432-
and in <a class=property data-link-type=propdesc title=max-resolution>max-resolution</a> queries the most-dense dimensions must be compared instead.
1433-
A <a class=property data-link-type=propdesc href=#descdef-media-resolution title=resolution>resolution</a> query that’s not evaluated in a <a data-link-type=dfn href=#range-context title="range context">range context</a> never matches a device with non-square pixels.</p>
1434-
1435-
<p class=issue id=issue-82c28e24><a class=self-link href=#issue-82c28e24></a>
1436-
Figure out how to make the above work properly for &lt;/&gt; syntax.
1437-
Just translate it over directly?
1438-
That prevents you from doing a "less than/greater than" dichotomy without using <a class=css data-link-type=maybe href=#valdef-media-not title=not>not</a>.
1439-
Hmm.
1425+
<p>The <a class=property data-link-type=propdesc href=#descdef-media-resolution title=resolution>resolution</a> media feature describes the resolution of the output
1426+
device, i.e. the density of the pixels, taking into account the <a data-link-spec=cssom-view data-link-type=dfn href=http://dev.w3.org/csswg/cssom-view-1/#page-zoom title="page zoom">page zoom</a> but assuming a <a data-link-spec=cssom-view data-link-type=dfn href=http://dev.w3.org/csswg/cssom-view-1/#pinch-zoom title="pinch zoom">pinch zoom</a>
1427+
of 1.0.</p>
1428+
1429+
<p class=note><a class="production css" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#resolution-value title="<resolution>">&lt;resolution&gt;</a> does not refer to the number of physical dots physical length units, but to the number of physical dots per CSS unit
1430+
1431+
<p>When querying media with non-square pixels, <a class=property data-link-type=propdesc href=#descdef-media-resolution title=resolution>resolution</a> queries the density in the vertical dimension.</p>
14401432

14411433
<p>For printers, this corresponds to the screening resolution
14421434
(the resolution for printing dots of arbitrary color).
@@ -2592,12 +2584,6 @@ <h2 class="no-num no-ref heading settled" id=property-index><span class=content>
25922584

25932585

25942586
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>
2595-
Figure out how to make the above work properly for &lt;/&gt; syntax.
2596-
Just translate it over directly?
2597-
That prevents you from doing a "less than/greater than" dichotomy without using <a class=css data-link-type=maybe href=#valdef-media-not title=not>not</a>.
2598-
Hmm.
2599-
2600-
<a href=#issue-82c28e24></a></div><div class=issue>
26012587
Another media feature should probably be added to deal with the type of resolution authors want to know to deal with monochrome printing.
26022588

26032589
<a href=#issue-7ddcf400></a></div><div class=issue>“Viewport” isn’t the right term here, or in <a class=property data-link-type=propdesc href=#descdef-media-overflow-inline title=overflow-inline>overflow-inline</a>.<a href=#issue-379b3dad></a></div><div class=issue>The names of <a class=property data-link-type=propdesc href=#descdef-media-overflow-block title=overflow-block>overflow-block</a> and <a class=property data-link-type=propdesc href=#descdef-media-overflow-inline title=overflow-inline>overflow-inline</a> are possibly confusing.

0 commit comments

Comments
 (0)