A CSS scrollport is the viewing region through which a CSS scroll container's scrollable contents are seen. The overflow specification identifies it with the container's padding box. A CSS scroll position determines the alignment of the larger contents within this region.[ref]
CSS Overflow Module Level 3 by World Wide Web Consortium. §2.3, Scrolling Overflow, scrollport and scroll position
Consider a stipulated two-dimensional example with a -by--pixel viewing region and contents occupying a -by--pixel rectangle. Use left-to-right horizontal coordinates, a top-left origin and no scrollbar-size complication. At scroll offset , the visible content rectangle isThe largest offsets that align its far edges with the contents' far edges are in this geometry. These coordinates describe a viewing alignment, not a change in the content's dimensions.
Box edges matter too. A box with content dimensions by CSS pixels and ten-pixel padding on every side has a -by- CSS padding box. Two-pixel borders then give a -by- CSS border box. Under the stated scrolling assumptions, the border dimensions are not the scrollport dimensions.
The scrollport is also distinct from the page's layout viewport. A small scrolling panel can have its own viewing region inside a larger page. Descendant DOM nodes remain in the document when their rendered contents lie outside that panel's current view.
Writing direction, layout alignment and scrolling APIs can affect origins and offset conventions. State those conventions before interpreting a number as a distance from the upper-left corner. The rectangle example supplies explicit conventions rather than imposing them on every possible CSS scroll container.
New to topics? Read the docs here!