@@ -130,7 +130,7 @@ A <dfn export>scrolling box</dfn> of a <a>viewport</a> or element has two <dfn>o
130130Note that the initial scroll position might not be aligned with the [=scrolling area origin=]
131131depending on the [=content-distribution properties=] , see [[css-align-3#overflow-scroll-position]] .
132132
133- The term <dfn>scrolling area</dfn> refers to a box of a <a>viewport</a> or an element that has the following edges, depending on the
133+ The term <dfn export >scrolling area</dfn> refers to a box of a <a>viewport</a> or an element that has the following edges, depending on the
134134<a>viewport’s</a> or element's <a>scrolling box’s</a> <a>overflow directions</a> .
135135
136136<table class="complex data">
@@ -293,74 +293,6 @@ The <dfn>ending edges</dfn> of a particular set of edges of a box or element are
293293 <dd> The top and right edges.
294294</dl>
295295
296- The <a>visual viewport</a> 's <a>scrolling area</a> is another <a>viewport</a> ,
297- the <a>layout viewport</a> .
298-
299- <style>
300- @keyframes lvmove {
301- 0%, 10%, 20% { transform: translate(0, 100px); }
302- 30%, 50%, 70% { transform: translate(0, 150px); }
303- 80%,100% { transform: translate(0, 100px); }
304- }
305- @keyframes vvmove {
306- 0%, 10% { transform: translate(70px, 150px); }
307- 30%, 50% { transform: translate(70px, 250px); }
308- 80%, 90% { transform: translate(70px, 100px); }
309- 100% { transform: translate(70px, 150px); }
310- }
311- #lv {
312- transform: translate(0, 100px);
313- animation: lvmove linear 3s infinite;
314- }
315- #vv {
316- transform: translate(20px, 150px);
317- animation: vvmove linear 3s infinite;
318- }
319- .paused #lv {
320- animation-play-state: paused;
321- }
322- .paused #vv {
323- animation-play-state: paused;
324- }
325- </style>
326- <div class="example paused" id="example-vvanimation">
327- <p>
328- This animation shows an example of a zoomed in visual viewport being "panned" around (for
329- example, by a user performing a touch drag). The page is scaled so that the layout viewport
330- is larger than the visual viewport.
331- </p>
332- <p>
333- A scroll delta is applied to the visual viewport first. When the visual viewport is at its
334- extent, scroll delta will be applied to the layout viewport. This behavior is implemented by
335- the [=viewport/perform a scroll=] steps.
336- </p>
337- <svg width="300" height="400">
338- <rect width="100%" height="100%" fill="white" stroke="grey" stroke-width="3"/>
339- <text x="10" y="30" font-family="Sans" font-size="25" fill="grey">
340- Document
341- </text>
342- <g id="lv">
343- <rect y="2" x="2" width="296" height="200" stroke="blue" fill="none" stroke-width="4"/>
344- <text x="10" y="20" font-family="Sans" font-size="15" fill="blue">
345- Layout Viewport
346- </text>
347- </g>
348- <g id="vv">
349- <rect y="2" x="2" width="148" height="100" stroke="red" fill="none" stroke-width="4"/>
350- <text x="10" y="60" font-family="Sans" font-size="15" fill="red">
351- Visual Viewport
352- </text>
353- </g>
354- </svg>
355- <br>
356- <button id="vvanimationBtn"> Toggle Animation</button>
357- <script>
358- document.getElementById('vvanimationBtn' ).onclick = () => {
359- document.getElementById('example-vvanimation' ).classList.toggle('paused' );
360- };
361- </script>
362- </div>
363-
364296The {{VisualViewport}} object has an <dfn for=visualviewport>associated document</dfn> , which is a {{Document}} object.
365297It is the <a for="/">associated document</a> of the owner {{Window}} of {{VisualViewport}} . The <a>layout viewport</a>
366298is the owner {{Window}} 's <a>viewport</a> .
@@ -498,8 +430,8 @@ Note: Conceptually, the visual viewport is scrolled until it "bumps up" against
498430edge and then "pushes" the layout viewport by applying the scroll delta to the layout viewport.
499431However, the scrolls in the steps above are computed ahead of time and applied in the opposite order
500432so that the layout viewport is scrolled before the visual viewport. This is done for historical
501- reasons to ensure consistent scroll event ordering. See the <a href="#example-vvanimation">example
502- above </a> for a visual depiction.
433+ reasons to ensure consistent scroll event ordering. See the <a href="https://drafts.csswg.org/css-viewport/ #example-vvanimation">example
434+ </a> for a visual depiction.
503435
504436</div>
505437
0 commit comments