Skip to content

Commit 4c98bf2

Browse files
committed
[cssom][cssom-view] Reference CSS Values for CSS pixel
Fixes w3c#1204.
1 parent 694f965 commit 4c98bf2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

cssom-view/Overview.bs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ CSS pixels {#css-pixels}
345345
------------------------
346346

347347
All coordinates and dimensions for the APIs defined in this
348-
specification are in CSS pixels, unless otherwise specified. <!--[[!CSS]]-->
348+
specification are in <a lt=px value>CSS pixels</a>, unless otherwise specified. [[!CSS-VALUES]]
349349

350350
Note: This does not apply to e.g. {{matchMedia()}} as the units are explicitly given there.
351351

@@ -367,14 +367,14 @@ corner, and the x- and y-coordinates increase rightwards and downwards, respecti
367367

368368
The <dfn export>Web-exposed screen area</dfn> is one of the following:
369369

370-
* The area of the output device, in CSS pixels.
371-
* The area of the <a>viewport</a>, in CSS pixels.
370+
* The area of the output device, in <a lt=px value>CSS pixels</a>.
371+
* The area of the <a>viewport</a>, in <a lt=px value>CSS pixels</a>.
372372

373373
The <dfn export>Web-exposed available screen area</dfn> is one of the following:
374374

375-
* The available area of the rendering surface of the output device, in CSS pixels.
376-
* The area of the output device, in CSS pixels.
377-
* The area of the <a>viewport</a>, in CSS pixels.
375+
* The available area of the rendering surface of the output device, in <a lt=px value>CSS pixels</a>.
376+
* The area of the output device, in <a lt=px value>CSS pixels</a>.
377+
* The area of the <a>viewport</a>, in <a lt=px value>CSS pixels</a>.
378378

379379

380380
Common Infrastructure {#common-infrastructure}
@@ -512,7 +512,7 @@ The <dfn method for=Window>moveTo(<var>x</var>, <var>y</var>)</dfn> method must
512512
1. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
513513
1. If <var>source</var> is not <a>allowed to resize and move</a> <var>target</var>, terminate these steps.
514514
1. Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not move outside the available space.
515-
1. Move <var>target</var>’s window such that the window’s top left corner is at coordinates (<var>x</var>, <var>y</var>) relative to the top left corner of the output device, measured in CSS pixels of <var>target</var>. The positive axes are rightward and downward.
515+
1. Move <var>target</var>’s window such that the window’s top left corner is at coordinates (<var>x</var>, <var>y</var>) relative to the top left corner of the output device, measured in <a lt=px value>CSS pixels</a> of <var>target</var>. The positive axes are rightward and downward.
516516

517517
The <dfn method for=Window>moveBy(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
518518

@@ -521,7 +521,7 @@ The <dfn method for=Window>moveBy(<var>x</var>, <var>y</var>)</dfn> method must
521521
1. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
522522
1. If <var>source</var> is not <a>allowed to resize and move</a> <var>target</var>, terminate these steps.
523523
1. Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not move outside the available space.
524-
1. Move <var>target</var>'s window <var>x</var> CSS pixels of <var>target</var> rightward and <var>y</var> CSS pixels of <var>target</var> downward.
524+
1. Move <var>target</var>'s window <var>x</var> <a lt=px value>CSS pixels</a> of <var>target</var> rightward and <var>y</var> <a lt=px value>CSS pixels</a> of <var>target</var> downward.
525525

526526

527527
The <dfn method for=Window>resizeTo(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
@@ -531,7 +531,7 @@ The <dfn method for=Window>resizeTo(<var>x</var>, <var>y</var>)</dfn> method mus
531531
1. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
532532
1. If <var>source</var> is not <a>allowed to resize and move</a> <var>target</var>, terminate these steps.
533533
1. Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not get too small or bigger than the available space.
534-
1. Resize <var>target</var>'s window by moving its right and bottom edges such that the distance between the left and right edges of the viewport are <var>x</var> CSS pixels of <var>target</var> and the distance between the top and bottom edges of the viewport are <var>y</var> CSS pixels of <var>target</var>.
534+
1. Resize <var>target</var>'s window by moving its right and bottom edges such that the distance between the left and right edges of the viewport are <var>x</var> <a lt=px value>CSS pixels</a> of <var>target</var> and the distance between the top and bottom edges of the viewport are <var>y</var> <a lt=px value>CSS pixels</a> of <var>target</var>.
535535
1. Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does not grow outside the available space.
536536

537537
The <dfn method for=Window>resizeBy(<var>x</var>, <var>y</var>)</dfn> method must follow these steps:
@@ -541,7 +541,7 @@ The <dfn method for=Window>resizeBy(<var>x</var>, <var>y</var>)</dfn> method mus
541541
1. Let <var>source</var> be the <a>responsible browsing context</a> of the <a>incumbent settings object</a>.
542542
1. If <var>source</var> is not <a>allowed to resize and move</a> <var>target</var>, terminate these steps.
543543
1. Optionally, clamp <var>x</var> and <var>y</var> in a user-agent-defined manner so that the window does not get too small or bigger than the available space.
544-
1. Resize <var>target</var>'s window by moving its right edge <var>x</var> CSS pixels of <var>target</var> rightward and its bottom edge <var>y</var> CSS pixels of <var>target</var> downward.
544+
1. Resize <var>target</var>'s window by moving its right edge <var>x</var> <a lt=px value>CSS pixels</a> of <var>target</var> rightward and its bottom edge <var>y</var> <a lt=px value>CSS pixels</a> of <var>target</var> downward.
545545
1. Optionally, move <var>target</var>'s window in a user-agent-defined manner so that it does not grow outside the available space.
546546

547547
A <a>browsing context</a> <var>A</var> is <dfn>allowed to resize and move</dfn> a <a>browsing context</a> <var>B</var> if all the following conditions are met:
@@ -656,7 +656,7 @@ attribute must return zero. <!--fingerprint-->
656656
The <dfn attribute for=Window caniuse=devicepixelratio>devicePixelRatio</dfn> attribute must return the result of the following algorithm:
657657

658658
1. If there is no output device, return 1 and abort these steps.
659-
1. Let <var>CSS pixel size</var> be the size of a CSS pixel at the current <a>page zoom</a> scale factor and at a <a>pinch zoom</a> scale factor of 1.0.
659+
1. Let <var>CSS pixel size</var> be the size of a <a lt=px value>CSS pixel</a> at the current <a>page zoom</a> scale factor and at a <a>pinch zoom</a> scale factor of 1.0.
660660
1. Let <var>device pixel size</var> be the vertical size of a device pixel of the output device.
661661
1. Return the result of dividing <var>CSS pixel size</var> by <var>device pixel size</var>.
662662

@@ -683,7 +683,7 @@ To <dfn export>set up browsing context features</dfn> for a browsing context <va
683683
move outside the <a>Web-exposed available screen area</a>.
684684
1. Optionally, move <var>target</var>'s window such that the window's left edge is at the
685685
horizontal coordinate <var>x</var> relative to the left edge of the <a>Web-exposed screen
686-
area</a>, measured in CSS pixels of <var>target</var>. The positive axis is rightward.
686+
area</a>, measured in <a lt=px value>CSS pixels</a> of <var>target</var>. The positive axis is rightward.
687687
1. If <var>tokenizedFeatures</var>["<a for="supported open() feature name">top</a>"]
688688
<a for=map>exists</a>:
689689
1. Set <var>y</var> to the result of invoking the <a>rules for parsing integers</a> on
@@ -693,7 +693,7 @@ To <dfn export>set up browsing context features</dfn> for a browsing context <va
693693
move outside the <a>Web-exposed available screen area</a>.
694694
1. Optionally, move <var>target</var>'s window such that the window's top edge is at the
695695
vertical coordinate <var>y</var> relative to the top edge of the <a>Web-exposed screen
696-
area</a>, measured in CSS pixels of <var>target</var>. The positive axis is downward.
696+
area</a>, measured in <a lt=px value>CSS pixels</a> of <var>target</var>. The positive axis is downward.
697697
1. If <var>tokenizedFeatures</var>["<a for="supported open() feature name">width</a>"]
698698
<a for=map>exists</a>:
699699
1. Set <var>width</var> to the result of invoking the <a>rules for parsing integers</a> on

cssom/Overview.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,7 @@ depends on the component, as follows:
24572457
by the literal string "<code>%</code>" (U+0025).
24582458

24592459
<dt>&lt;resolution>
2460-
<dd>The resolution in dots per CSS pixel serialized as per
2460+
<dd>The resolution in dots per <a lt=px value>CSS pixel</a> serialized as per
24612461
&lt;number> followed by the literal string "<code>dppx</code>".
24622462

24632463
<dt>&lt;shape>

0 commit comments

Comments
 (0)