@@ -131,7 +131,7 @@ Module Interactions</h3>
131131-->
132132
133133<h2 id="overflow-concepts">
134- Types of Overflow </h2>
134+ Overflow Concepts and Terminology </h2>
135135
136136 CSS uses the term <dfn export>overflow</dfn> to describe
137137 the contents of a box
@@ -295,6 +295,12 @@ Scrollable Overflow</h3>
295295
296296 </ul>
297297
298+ Additionally, due to Web-compatibility constraints
299+ (caused by authors exploiting legacy bugs to surreptitiously hide content from visual readers but not search engines and/or speech output),
300+ UAs must clip any content in the [=negative scrollable overflow region=]
301+ (thereby behaving as if they had no <a>scrollable overflow</a>
302+ on the wrong side of the [=scroll origin=] ).
303+
298304 <!--
299305 Considerations:
300306 * floats
@@ -315,6 +321,76 @@ Scrollable Overflow</h3>
315321 in other coordinate systems due to transforms [[CSS3-TRANSFORMS]] .
316322 This means scrollbars can sometimes appear when not actually necessary.
317323
324+ <h3 id="scrolling">
325+ Scrolling Overflow</h3>
326+
327+ A box’s [=overflow=] can be visible or clipped.
328+ CSS also allows a box to be <dfn export>scroll container</dfn>
329+ that allows the user to scroll clipped parts of its <a>scrollable overflow area</a>
330+ into view.
331+ The visual viewport of a <a>scroll container</a>
332+ (through which the <a>scrollable overflow area</a> can be viewed)
333+ coincides with its padding box,
334+ and is called the <dfn export>scrollport</dfn> .
335+ A box’s <dfn export>nearest scrollport</dfn>
336+ is the [=scrollport=] of its nearest [=scroll container=] ancestor.
337+
338+ Scrolling operations can be initiated by the user
339+ (for example, by manipulating a scrollbar, swiping a touchscreen, or using keyboard controls)
340+ or by script
341+ (for example, by the {{scrollIntoView()}} or {{focus()}} APIs).
342+ The initial position of the [=scrollable overflow rectangle=] within the [=scrollport=]
343+ before any scrolling operations take effect is the <dfn>initial scroll position</dfn> .
344+ The [=initial scroll position=]
345+ is typically dependent on the [=scroll container=] ’s [=writing mode=] ,
346+ and, unless otherwise specified,
347+ coincides with its [=scroll origin position=] .
348+ However, the 'align-content' and 'justify-content' properties [[!CSS-ALIGN-3]]
349+ can be used to change the [=initial scroll position=] ,
350+ see [[css-align-3#overflow-scroll-position]] .
351+
352+ A <dfn>scroll position</dfn> is a particular alignment
353+ of the [=scrollable overflow rectangle=]
354+ within its [=scrollport=] .
355+ It is associated with a <dfn>scroll offset</dfn>
356+ which is its distance from the [=scroll origin=] .
357+
358+ The <dfn>scroll origin</dfn> is the anchor coordinate of the [=scrollable overflow rectangle=] ,
359+ from which the [=scrollable overflow rectangle=] expands.
360+ Unless otherwise specified,
361+ it is the [=block-start=] [=inline-start=] corner of the [=scrollable overflow rectangle=] .
362+ (For example, in a [=flex container=] it is the [=main-start=] [=cross-start=] corner.)
363+ The area beyond the [=scroll origin=] in either axis
364+ is considered the <dfn>negative scrollable overflow region</dfn> :
365+ content rendered here is the not accessible to the reader,
366+ see [[#scrollable]] .
367+ A [=scroll container=] is said to be scrolled to its [=scroll origin=]
368+ when its [=scroll origin=] coincides with the corresponding corner of its [=scrollport=] .
369+ This [=scroll position=] , the <dfn>scroll origin position</dfn> ,
370+ usually, but not always,
371+ coincides with the [=initial scroll position=] .
372+
373+ <div class="example">
374+ For example,
375+ the 'align-content' and 'justify-content' properties [[CSS-ALIGN-3]]
376+ and [=scroll snapping=] [[CSS-SCROLL-SNAP-1]]
377+ can change the [=initial scroll position=]
378+ away from the [=scroll origin position=] .
379+ </div>
380+
381+ ISSUE: Check whether things like [=baseline alignment=]
382+ depend on the [=initial scroll position=] or the [=scroll origin position=] .
383+
384+ ISSUE: This doesn't define a coordinate system for [=scroll offsets=] .
385+ Whether they increase downward/rightward,
386+ block/inline-axis endward,
387+ or away from the [=scroll origin=] is not defined.
388+ Should each API define its coordinate model?
389+
390+ The root viewport, which scrolls the page [=canvas=] ,
391+ uses the <a>principal writing mode</a> for determining
392+ its [=scroll origin=] and [=initial scroll position=] .
393+
318394<!--
319395 ███████ ██ ██ ████████ ████████ ████████ ██ ███████ ██ ██
320396██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
@@ -326,21 +402,10 @@ Scrollable Overflow</h3>
326402-->
327403
328404<h2 id="overflow-properties">
329- Scrolling and Clipping Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties </h2>
405+ Scrolling and Clipping Overflow</h2>
330406
331- These properties specify whether a box’s content
332- (including any <a>ink overflow</a> )
333- is clipped to its padding edge,
334- and if so,
335- whether it is a <dfn export>scroll container</dfn>
336- that allows the user to scroll clipped parts of its <a>scrollable overflow area</a>
337- into view.
338- The visual viewport of the <a>scroll container</a>
339- (through which the <a>scrollable overflow area</a> can be viewed)
340- coincides with its padding box,
341- and is called the <dfn export>scrollport</dfn> .
342- For convenience, a box’s <dfn export>nearest scrollport</dfn>
343- is the [=scrollport=] of its nearest [=scroll container=] ancestor.
407+ <h3 id="overflow-control">
408+ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties</h3>
344409
345410 <pre class=propdef>
346411 Name : overflow-x, overflow-y, overflow-block, overflow-inline
@@ -353,6 +418,10 @@ Scrolling and Clipping Overflow: the 'overflow-x', 'overflow-y', and 'overflow'
353418 Animation type : discrete
354419 </pre>
355420
421+ These properties specify whether a box’s [=overflow=] is clipped,
422+ and if so,
423+ whether it is a [=scroll container=] .
424+
356425 The 'overflow-x' property specifies
357426 the handling of <a>overflow</a> in the horizontal axis
358427 (i.e., overflow from the left and right sides of the box),
@@ -510,31 +579,6 @@ Overflow in Print and Other Static Media</h3>
510579 for example, e-book readers paginate content,
511580 but are interactive.
512581
513- <h3 id="scrolling-direction">
514- Scrolling Origin, Direction, and Restriction</h3>
515-
516- The <dfn export>initial scroll position</dfn> is
517- the initial position of
518- the box’s <a>scrollable overflow area</a>
519- with respect to its border box,
520- prior to any user or programmatic scrolling that changes it.
521- The <a>initial scroll position</a>
522- is dependent on the box’s <a>writing mode</a> ,
523- and is by default the <a>block-start</a> /<a>inline-start</a> edge
524- of the box’s <a>padding edge</a> .
525- However, the 'align-content' and 'justify-content' properties [[!CSS-ALIGN-3]]
526- can be used to change this,
527- see [[css-align-3#overflow-scroll-position]] .
528-
529- Due to Web-compatibility constraints
530- (caused by authors exploiting legacy bugs to surreptitiously hide content from visual readers but not search engines and/or speech output),
531- UAs must clip the <a>scrollable overflow area</a>
532- of <a>scroll containers</a>
533- on the <a>block-start</a> and </a> inline-start</a> sides of the box
534- (thereby behaving as if they had no <a>scrollable overflow</a> on that side).
535-
536- The viewport uses the <a>principal writing mode</a> for these calculations.
537-
538582<h3 id="overflow-clip-margin">
539583Expanding Clipping Bounds: the 'overflow-clip-margin' property</h3>
540584
0 commit comments