@@ -404,21 +404,29 @@ Scroll Snapport: the 'scroll-padding' property {#scroll-padding}
404
404
Animatable : as length, percentage, or calc
405
405
</pre>
406
406
407
- The 'scroll-padding' property defines the
408
- <dfn>optimal viewing region</dfn> of the scrollport,
407
+ This property is a <a>shorthand property</a> that sets
408
+ all of the <a href="#longhands"><css>scroll-padding-*</css> longhands</a>
409
+ in one declaration,
410
+ assigning values to the longhands representing each side
411
+ exactly as the 'padding' property does for its longhands.
412
+
413
+ Values must be non-negative
414
+ and represent inward offsets from the corresponding edge of the scrollport.
415
+ These offsets define the
416
+ <dfn>optimal viewing region</dfn> of the scrollport:
409
417
the region used as the target region for placing things in view of the user.
410
- It allows the author to exclude regions of the scrollport
418
+ This allows the author to exclude regions of the scrollport
411
419
that are obscured by other content
412
420
(such as fixed-positioned toolbars or sidebars)
413
421
or simply to put more breathing room
414
422
between a targetted element and the edges of the scrollport.
415
423
416
- The 'scroll-padding' effectively reduces the region of the viewport
424
+ The 'scroll-padding' offsets effectively reduce the region of the viewport
417
425
that is considered “viewable” <em> for scrolling operations</em> :
418
- it has no effect on layout,
426
+ they have no effect on layout,
419
427
on the scroll origin or initial position,
420
428
or on whether or not an element is considered actually <em> visible</em> ,
421
- but it should
429
+ but should
422
430
affect whether an element or the caret is considered scrolled into view,
423
431
and reduce the amount of scrolling for paging operations
424
432
(such as using the <kbd> PgUp</kbd> and <kbd> PgDn</kbd> keys
@@ -431,10 +439,6 @@ Scroll Snapport: the 'scroll-padding' property {#scroll-padding}
431
439
the area of the scrollport that is used as the <a>alignment container</a>
432
440
for the <a>scroll snap areas</a> when calculating <a>snap positions</a> .
433
441
434
- Values must be non-negative
435
- and are interpreted as for 'padding' ,
436
- specifying inward offsets from each edge of the scrollport.
437
-
438
442
<div class="example">
439
443
In this example, 'scroll-padding' is used to center slideshow images
440
444
within the portion of the scrollport
@@ -459,10 +463,6 @@ Scroll Snapport: the 'scroll-padding' property {#scroll-padding}
459
463
</pre>
460
464
</div>
461
465
462
- This property is a <a>shorthand property</a> that sets
463
- all of the <a href="#longhands"><css>scroll-padding-*</css> longhands</a>
464
- in one declaration.
465
-
466
466
Aligning Scroll Snap Areas: Properties on the elements {#properties-on-the-elements}
467
467
=====================================================================================
468
468
@@ -491,22 +491,22 @@ Scroll Snapping Area: the 'scroll-snap-margin' property {#scroll-snap-margin}
491
491
Animatable : as length
492
492
</pre>
493
493
494
- The 'scroll-snap-margin' property defines
495
- the <dfn lt="scroll snap area" local-lt="snap area">scroll snap area</dfn>
494
+ This property is a <a>shorthand property</a> that sets
495
+ all of the <a href="#longhands"><css>scroll-snap-margin-*</css> longhands</a>
496
+ in one declaration,
497
+ assigning values to the longhands representing each side
498
+ exactly as the 'margin' property does for its longhands.
499
+
500
+ Values represent outsets defining the
501
+ <dfn lt="scroll snap area" local-lt="snap area">scroll snap area</dfn>
496
502
that is used for snapping this box to the snapport.
497
- The <<length>> values give outsets
498
- (interpreted as for 'margin' or 'border-image-outset' ).
499
503
The <a>scroll snap area</a> is the rectangular bounding box of the transformed border box,
500
504
plus the specified outsets,
501
505
axis-aligned in the <a>scroll container’s</a> coordinate space.
502
506
503
507
Note: This ensures that the <a>scroll snap area</a> is always rectangular
504
508
and axis-aligned to the <a>scroll container’s</a> coordinate space.
505
509
506
- This property is a <a>shorthand property</a> that sets
507
- all of the <a href="#longhands"><css>scroll-snap-margin-*</css> longhands</a>
508
- in one declaration.
509
-
510
510
<!--
511
511
███ ██ ████ ██████ ██ ██
512
512
██ ██ ██ ██ ██ ██ ███ ██
@@ -916,6 +916,8 @@ Choosing Snap Positions {#choosing}
916
916
Appendix A: Longhands {#longhands}
917
917
==================================
918
918
919
+ The physical and logical longhands interact as defined in [[!CSS-LOGICAL-1]] .
920
+
919
921
Physical Longhands for 'scroll-padding' {#padding-longhands-physical}
920
922
----------------------------------------------------------------------
921
923
0 commit comments