Skip to content

Commit 38caa2e

Browse files
committed
[css-scroll-snap] Rearrange prose to be clearer about value mapping to longhands, link to css-logical. Fixes #1050.
1 parent 4944987 commit 38caa2e

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

css-scroll-snap/Overview.bs

+24-22
Original file line numberDiff line numberDiff line change
@@ -404,21 +404,29 @@ Scroll Snapport: the 'scroll-padding' property {#scroll-padding}
404404
Animatable: as length, percentage, or calc
405405
</pre>
406406

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:
409417
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
411419
that are obscured by other content
412420
(such as fixed-positioned toolbars or sidebars)
413421
or simply to put more breathing room
414422
between a targetted element and the edges of the scrollport.
415423

416-
The 'scroll-padding' effectively reduces the region of the viewport
424+
The 'scroll-padding' offsets effectively reduce the region of the viewport
417425
that is considered “viewable” <em>for scrolling operations</em>:
418-
it has no effect on layout,
426+
they have no effect on layout,
419427
on the scroll origin or initial position,
420428
or on whether or not an element is considered actually <em>visible</em>,
421-
but it should
429+
but should
422430
affect whether an element or the caret is considered scrolled into view,
423431
and reduce the amount of scrolling for paging operations
424432
(such as using the <kbd>PgUp</kbd> and <kbd>PgDn</kbd> keys
@@ -431,10 +439,6 @@ Scroll Snapport: the 'scroll-padding' property {#scroll-padding}
431439
the area of the scrollport that is used as the <a>alignment container</a>
432440
for the <a>scroll snap areas</a> when calculating <a>snap positions</a>.
433441

434-
Values must be non-negative
435-
and are interpreted as for 'padding',
436-
specifying inward offsets from each edge of the scrollport.
437-
438442
<div class="example">
439443
In this example, 'scroll-padding' is used to center slideshow images
440444
within the portion of the scrollport
@@ -459,10 +463,6 @@ Scroll Snapport: the 'scroll-padding' property {#scroll-padding}
459463
</pre>
460464
</div>
461465

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-
466466
Aligning Scroll Snap Areas: Properties on the elements {#properties-on-the-elements}
467467
=====================================================================================
468468

@@ -491,22 +491,22 @@ Scroll Snapping Area: the 'scroll-snap-margin' property {#scroll-snap-margin}
491491
Animatable: as length
492492
</pre>
493493

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>
496502
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').
499503
The <a>scroll snap area</a> is the rectangular bounding box of the transformed border box,
500504
plus the specified outsets,
501505
axis-aligned in the <a>scroll container’s</a> coordinate space.
502506

503507
Note: This ensures that the <a>scroll snap area</a> is always rectangular
504508
and axis-aligned to the <a>scroll container’s</a> coordinate space.
505509

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-
510510
<!--
511511
███ ██ ████ ██████ ██ ██
512512
██ ██ ██ ██ ██ ██ ███ ██
@@ -916,6 +916,8 @@ Choosing Snap Positions {#choosing}
916916
Appendix A: Longhands {#longhands}
917917
==================================
918918

919+
The physical and logical longhands interact as defined in [[!CSS-LOGICAL-1]].
920+
919921
Physical Longhands for 'scroll-padding' {#padding-longhands-physical}
920922
----------------------------------------------------------------------
921923

0 commit comments

Comments
 (0)