1717Former Editor : Øyvind Stenhaug, Opera Software, [email protected] 1818Abstract : This specification provides a way for an author to specify, in CSS, the size, zoom factor, and orientation of the viewport that is used as the base for the initial containing block.
1919Issue Tracking : CSSWG GitHub https://github.com/w3c/csswg-drafts/labels/css-viewport-1
20- Ignored Vars : <viewport-length>
20+ Ignored Vars : document, parameters, <viewport-length>
2121</pre>
2222
2323<pre class="anchors">
@@ -32,8 +32,10 @@ spec: fenced-frames; urlPrefix: https://wicg.github.io/fenced-frame/
3232</pre>
3333
3434<pre class=link-defaults>
35- spec:webdriver2; type:dfn; text:remote end steps
36- spec:webdriver2; type:dfn; text:error
35+ spec:webdriver2; type:dfn;
36+ text:error
37+ text:remote end steps
38+ text:success
3739</pre>
3840
3941<h2 id="intro">
@@ -90,14 +92,14 @@ The page area can be set through ''@page'' rules.
9092
9193This specification introduces a way of overriding the size of the viewport
9294provided by the user agent (UA). Because of this, we need to introduce the
93- difference between the '' initial viewport'' and the '' actual viewport'' .
95+ difference between the [= initial viewport=] and the [= actual viewport=] .
9496
9597<dl>
9698 <dt> <dfn>initial viewport</dfn> </dt>
9799 <dd>
98100 This refers to the viewport before any UA or author styles have
99101 overridden the viewport given by the window or viewing area of the UA.
100- Note that the '' initial viewport'' size will change with the
102+ Note that the [= initial viewport=] size will change with the
101103 size of the window or viewing area.</dd>
102104 <dt> <dfn>actual viewport</dfn> </dt>
103105 <dd>
@@ -106,25 +108,25 @@ difference between the ''initial viewport'' and the ''actual viewport''.
106108 </dd>
107109</dl>
108110
109- ISSUE: Make '' actual viewport'' the layout viewport, define visual viewport.
111+ ISSUE: Make [= actual viewport=] the layout viewport, define visual viewport.
110112
111- When the '' actual viewport'' cannot fit inside the window or
112- viewing area, either because the '' actual viewport'' is
113- larger than the '' initial viewport'' or the zoom factor
114- causes only parts of the '' actual viewport'' to be visible,
113+ When the [= actual viewport=] cannot fit inside the window or
114+ viewing area, either because the [= actual viewport=] is
115+ larger than the [= initial viewport=] or the zoom factor
116+ causes only parts of the [= actual viewport=] to be visible,
115117the UA should offer a scrolling or panning mechanism.
116118
117119It is recommended that initially the upper-left corners of the
118- '' actual viewport'' and the window or viewing area are aligned if the
120+ [= actual viewport=] and the window or viewing area are aligned if the
119121base direction of the document is ltr. Similarly, that the upper-right
120122corners are aligned when the base direction is rtl. The base direction
121123for a document is defined as the computed value of the 'direction'
122124property for the first <code class=html> <BODY></code> element of
123125an HTML or XHTML document. For other document types, it is the
124126computed 'direction' for the root element.
125127
126- <h3 id="display-feature"><dfn> Display feature</dfn> definition</h3>
127- A display feature is a hardware feature that acts as a divider
128+ <h3 id="the- display-feature">Display feature definition</h3>
129+ A <dfn>Display feature</dfn> is a hardware feature that acts as a divider
128130and creates logically separate region of the viewport called {{segments}} .
129131It can be a fold area of a device with a foldable screen or a physical
130132split occupying a logical space within the viewport for example some dual
@@ -133,10 +135,10 @@ screen models.
133135Below is an illustration describing the concept of display features and how
134136they divide the viewport in {{segments}} :
135137
136- <img src="display_features_general.svg" alt="Two images,
137- showing two display feature configurations and the respective segments.
138- One image is showing an vertical display feature, the other is showing
139- an horizontal display feature" style="width: 70%;height: auto; margin:auto; display: flex;">
138+ <img src="display_features_general.svg" width="560" height="258"
139+ alt="Two images, showing two display feature configurations and the respective segments.
140+ One image is showing an vertical display feature, the other is showing
141+ an horizontal display feature" style="width: 70%;height: auto; margin:auto; display: flex;">
140142
141143
142144<h2 id="viewport-meta">
@@ -389,7 +391,7 @@ only the value previously set to it.
389391An element becomes zoomed when the 'zoom' property has a positive computed value different than 1
390392(or when a flat tree ancestor has zoom).
391393
392- To apply zoom, the [=used value=] of a CSS property (including values inside of [= path()=] strings) is pre-multiplied
394+ To apply zoom, the [=used value=] of a CSS property (including values inside of '' path()'' strings) is pre-multiplied
393395(before any other steps in the [=used value=] stage)
394396by the [=used value=] of 'zoom' for the element.
395397It also multiplies the [=natural size=] of all replaced elements,
@@ -406,7 +408,7 @@ all inherited properties such as 'line-height' and 'font-size'.
406408Nested values of 'zoom' multiply, resulting in additional scaling of <<length>> values.
407409The [=used value=] for zoom is always its [=effective zoom=] .
408410
409- The 'zoom' property has no effect on <<length>> property values with computed values that are ' auto' or <<percentage>> .
411+ The 'zoom' property has no effect on <<length>> property values with computed values that are <css> auto</css> or <<percentage>> .
410412
411413Note: Unlike 'transform' ,
412414scaling the 'zoom' property affects layout.
@@ -480,8 +482,8 @@ Negative values for 'zoom' are illegal.
480482 </pre>
481483
482484 Here is an llustration of the before and after hover state of the message box element:
483- <img src="css_zoom_hover_example.png" alt="Two images,
484- showing the zooming effect before and after zoom has applied. The second is 1.5 larger.">
485+ <img src="css_zoom_hover_example.png" width="704" height="270"
486+ alt="Two images showing the zooming effect before and after zoom has applied. The second is 1.5 larger.">
485487</div>
486488
487489<div class="example">
@@ -553,9 +555,7 @@ partial interface Window {
553555};
554556</pre>
555557
556- <h2 id=viewport>Viewport</h2>
557-
558- <h3 id="the-viewport-interface">The {{Viewport}} Interface</h3>
558+ <h2 id="the-viewport-interface">The {{Viewport}} Interface</h2>
559559
560560<pre class=idl>
561561[Exposed=Window]
@@ -593,23 +593,31 @@ If a viewport of 400px by 400px is split horizontally into two side-by-side segm
593593
594594</div>
595595
596+ <h2 class=no-num id="privacy">Privacy Considerations</h2>
597+
598+ No new privacy considerations have been reported on this specification.
599+
600+ <h2 class=no-num id="security">Security Considerations</h2>
601+
602+ No new security considerations have been reported on this specification.
603+
596604<h2 class="no-num" id="changes">Appendix A. Changes</h2>
597605
598606This appendix is <em> informative</em> .
599607
600- <h3 class="no-num">Since the
608+ <h3 class="no-num" id="changes-20160329" >Since the
601609 <a href="http://www.w3.org/TR/2016/WD-css-device-adapt-1-20160329/">29
602610 March 2016 Working Draft</a>
603611</h3>
604612
605613<ul>
606- <li> Added ' interactive-widgets' property to viewport meta</li>
607- <li> Removed @viewport rule</li>
614+ <li> Added <css> interactive-widgets</css> property to viewport meta</li>
615+ <li> Removed <css> @viewport</css> rule</li>
608616 <li> Renamed spec from device-adapt to css-viewport</li>
609617 <li> CSSViewportRule exposed to Window</li>
610618</ul>
611619
612- <h3 class="no-num">Since the
620+ <h3 class="no-num" id="changes-20110915" >Since the
613621 <a href="https://www.w3.org/TR/2011/WD-css-device-adapt-20110915/">15
614622 September 2011 First Public Working Draft</a>.
615623</h3>
@@ -622,17 +630,16 @@ This appendix is <em>informative</em>.
622630 <li> Added recommendation for when to respect orientation property.
623631 <li> Dropped support for the resolution descriptor.
624632 <li> Decouple width/height and zoom, introducing ''extend-to-zoom'' value for meta viewport translation.
625- <li> Made normative rules about interaction of @viewport and @media.
626- <li> Allow 0 for << viewport-length>> and '@viewport/ zoom' values
633+ <li> Made normative rules about interaction of <css> @viewport</css> and '' @media'' .
634+ <li> Allow 0 for <css> < viewport-length> </css> and <css> zoom</css> values
627635 <li> Removed support for device-width/height.
628- <li> Apply @viewport to top level document only.
629- <li> Extend [[!CSS3-CONDITIONAL]] rather than CSS21 for nesting in @media.
630- <li> Removed @viewport
636+ <li> Apply <css> @viewport</css> to top level document only.
637+ <li> Extend [[!CSS3-CONDITIONAL]] rather than CSS21 for nesting in ''@media'' .
631638</ul>
632639
633640<h2 class="no-num" id="automation">Appendix B. Automation</h2>
634641
635- <h3>Automation of the {{segments}} property</h3>
642+ <h3 id="automation-segments" >Automation of the {{segments}} property</h3>
636643The {{segments}} property poses a challenge to test authors, as exercising this property
637644requires access to specific hardware devices. To address this challenge this document defines
638645[[WEBDRIVER2]] [=extension commands=] that allow users to control how the viewport is split by
@@ -715,9 +722,8 @@ parameter.
715722
716723 Below is an illustration showing the various properties of a display feature:
717724
718- <img src="display_features.svg" alt="Two images,
719- showing the meaning of each display feature attributes. One image is showing an
720- vertical display feature, the other is showing an horizontal display feature" style="width: 70%;height: auto; margin:auto; display: flex;">
725+ <img src="display_features.svg" width="560" height="258"
726+ alt="Two images showing the meaning of each display feature attributes. One image is showing a vertical display feature, the other is showing an horizontal display feature" style="width: 70%;height: auto; margin:auto; display: flex;">
721727
722728 <div class="example">
723729 To create a [=[[DisplayFeaturesOverride]]=] in the <a spec="WEBDRIVER2">current browsing context</a> of the [=session=] with ID 23,
0 commit comments