@@ -400,26 +400,18 @@ Scroll Snap Strictness: the ''scroll-snap-type/none'', ''proximity'', and ''mand
400
400
Scroll Snapport: the 'scroll-padding' property {#scroll-padding}
401
401
----------------------------------------------------------------
402
402
403
- <pre class="propdef">
403
+ <pre class="propdef shorthand ">
404
404
Name : scroll-padding
405
- Value : <<length-percentage>>{1,4}
406
- Initial : 0
405
+ Value : [ <<length-percentage>> | auto ] {1,4}
406
+ Initial : auto
407
407
Applies to : <a>scroll containers</a>
408
408
Inherited : no
409
409
Percentages : relative to the corresponding dimension of the scroll container’s scrollport
410
410
Computed value : as specified, with lengths made absolute
411
411
Animatable : as length, percentage, or calc
412
412
</pre>
413
413
414
- This property is a <a>shorthand property</a> that sets
415
- all of the <a href="#longhands"><css>scroll-padding-*</css> longhands</a>
416
- in one declaration,
417
- assigning values to the longhands representing each side
418
- exactly as the 'padding' property does for its longhands.
419
-
420
- Values must be non-negative
421
- and represent inward offsets from the corresponding edge of the scrollport.
422
- These offsets define the
414
+ This property specifies offsets that define the
423
415
<dfn export>optimal viewing region</dfn> of the scrollport:
424
416
the region used as the target region for placing things in view of the user.
425
417
This allows the author to exclude regions of the scrollport
@@ -428,7 +420,35 @@ Scroll Snapport: the 'scroll-padding' property {#scroll-padding}
428
420
or simply to put more breathing room
429
421
between a targetted element and the edges of the scrollport.
430
422
431
- The 'scroll-padding' offsets effectively reduce the region of the viewport
423
+ The 'scroll-padding' property is a <a>shorthand property</a> that sets
424
+ all of the <a href="#longhands"><css>scroll-padding-*</css> longhands</a>
425
+ in one declaration,
426
+ assigning values to the longhands representing each side
427
+ exactly as the 'padding' property does for its longhands.
428
+ Values have the following meanings:
429
+
430
+ <dl dfn-for="scroll-padding, scroll-padding-inline, scroll-padding-inline-start, scroll-padding-inline-end, scroll-padding-block, scroll-padding-block-start, scroll-padding-block-end" dfn-type=value>
431
+ : <dfn><<length-percentage>></dfn>
432
+ ::
433
+ Defines an inward offset from the corresponding edge of the [=scrollport=] .
434
+
435
+ : <dfn>auto</dfn>
436
+ ::
437
+ Indicates that the offset for the corresponding edge of the [=scrollport=] is UA-determined.
438
+ This will generally default to a used length of ''0px'' ,
439
+ but UAs may use heuristics to detect when a non-zero value is more appropriate.
440
+
441
+ <div class=example>
442
+ For example, a UA could detect when a ''position:fixed'' element
443
+ is being used as an opaque unscrollable “header”
444
+ that obscures the content below it,
445
+ and resolve the top offset to the height of that element
446
+ so that a “page down” operation (such as pressing <kbd> PgDn</kbd> )
447
+ automatically scrolls by one “visible page” of content.
448
+ </div>
449
+ </dl>
450
+
451
+ These offsets reduce the region of the viewport
432
452
that is considered “viewable” <em> for scrolling operations</em> :
433
453
they have no effect on layout,
434
454
on the scroll origin or initial position,
0 commit comments