Skip to content

Commit cb5cac0

Browse files
committed
[mediaqueries] Improve the note highlighting that resolution is not the physical pixel density, and clarifying how non square pixels work
1 parent 4d01e34 commit cb5cac0

2 files changed

Lines changed: 32 additions & 4 deletions

File tree

mediaqueries/Overview.bs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,10 +1010,24 @@ resolution</h3>
10101010
spec=cssom-view>page zoom</a> but assuming a <a spec=cssom-view>pinch zoom</a>
10111011
of 1.0.
10121012

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-
10151013
When querying media with non-square pixels, 'resolution' queries the density in the vertical dimension.
10161014

1015+
<div class="note"><<resolution>> does not refer to the number of device
1016+
pixels per physical length unit, but the number of device pixels per css
1017+
pixels. This mapping is done by the user agent, so it is always known to the
1018+
user agent.
1019+
1020+
If the user agent either has no knowledge of the geometry of physical pixels,
1021+
or knows about the geometry physical pixels and they are (close enough to)
1022+
square, it would not map a different number of device pixels per css pixels
1023+
along each axis, and the would therefore be no difference between the vertical
1024+
and horizontal resolution.
1025+
1026+
Otherwise, if the UA choses to map a different number along each axis,
1027+
this would be to respond to physical pixels not being square either. How
1028+
the UA comes to this knowledge is out of scope, but having enough information
1029+
to take this decision, it can invert the mapping should the device be rotated 90 degrees.</div>
1030+
10171031
For printers, this corresponds to the screening resolution
10181032
(the resolution for printing dots of arbitrary color).
10191033
Printers might have a different resolution for grayscale printing.

mediaqueries/Overview.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,10 +1426,24 @@ <h3 class="heading settled" data-level=5.1 id=resolution><span class=secno>5.1 <
14261426
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>
14271427
of 1.0.</p>
14281428

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-
14311429
<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>
14321430

1431+
<div 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 device
1432+
pixels per physical length unit, but the number of device pixels per css
1433+
pixels. This mapping is done by the user agent, so it is always known to the
1434+
user agent.
1435+
1436+
<p>If the user agent either has no knowledge of the geometry of physical pixels,
1437+
or knows about the geometry physical pixels and they are (close enough to)
1438+
square, it would not map a different number of device pixels per css pixels
1439+
along each axis, and the would therefore be no difference between the vertical
1440+
and horizontal resolution.</p>
1441+
1442+
<p>Otherwise, if the UA choses to map a different number along each axis,
1443+
this would be to respond to physical pixels not being square either. How
1444+
the UA comes to this knowledge is out of scope, but having enough information
1445+
to take this decision, it can invert the mapping should the device be rotated 90 degrees.</div><p></p>
1446+
14331447
<p>For printers, this corresponds to the screening resolution
14341448
(the resolution for printing dots of arbitrary color).
14351449
Printers might have a different resolution for grayscale printing.</p>

0 commit comments

Comments
 (0)