Skip to content

Commit 717a1e9

Browse files
committed
[css-scroll-snap] Rename scroll-snap-area to scroll-snap-margin per WG resolution
1 parent c266fb0 commit 717a1e9

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

css-scroll-snap/Overview.bs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Use Cases {#use-cases}
4242
:root { scroll-snap-type: proximity; }
4343
h1, h2, h3, h4, h5, h6 {
4444
scroll-snap-align: start;
45-
scroll-snap-area: 0.25em;
45+
scroll-snap-margin: 0.25em;
4646
}
4747
</pre>
4848

@@ -160,7 +160,7 @@ On the children:
160160
<td>High priority
161161
<tr>
162162
<td>n/a
163-
<td>''scroll-snap-area: <<length>>{1,4}''
163+
<td>''scroll-snap-margin: <<length>>{1,4}''
164164
<td>High priority
165165
</table>
166166

@@ -177,7 +177,7 @@ Scroll Snapping Model {#snap-model}
177177

178178
Valid <a>snap positions</a> can be specified
179179
as a particular alignment ('scroll-snap-align')
180-
of an element's <a>scroll snap area</a> ('scroll-snap-area', defaulting to its border box)
180+
of an element's <a>scroll snap area</a> ('scroll-snap-margin', defaulting to its border box)
181181
within the <a>scroll container</a>’s <a>snap viewport</a>
182182
(its viewport, as reduced by 'scroll-snap-padding').
183183
This is conceptually equivalent to specifying the alignment of
@@ -435,11 +435,11 @@ Element-based Snapping {#element}
435435
██ ██ ██ ██ ████████ ██ ██
436436
-->
437437

438-
Scroll Snapping Area: the 'scroll-snap-area' property {#scroll-snap-areas}
438+
Scroll Snapping Area: the 'scroll-snap-margin' property {#scroll-snap-areas}
439439
---------------------
440440

441441
<pre class="propdef">
442-
Name: scroll-snap-area
442+
Name: scroll-snap-margin
443443
Value: <<length>>{1,4}
444444
Initial: 0
445445
Applies to: all elements
@@ -451,17 +451,17 @@ Scroll Snapping Area: the 'scroll-snap-area' property {#scroll-snap-areas}
451451

452452
Specifies the <dfn lt="scroll snap area" local-lt="snap area">scroll snap area</dfn>
453453
that is used for snapping this box to the viewport.
454-
<<length>> values give outsets (similar to 'margin' or 'border-image-outset').
454+
The <<length>> values give outsets
455+
(similar to 'margin' or 'border-image-outset').
455456
The <a>scroll snap area</a> is the bounding box of the transformed border box,
457+
plus the specified outsets,
456458
in the <a>scroll container’s</a> coordinate space.
457-
Outsets are applied to the bounding box,
458-
not the border box.
459459

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

463463
This property is a <a>shorthand property</a> that sets
464-
all of the <a href="#longhands"><css>scroll-snap-area-*</css> longhands</a>
464+
all of the <a href="#longhands"><css>scroll-snap-margin-*</css> longhands</a>
465465
in one declaration.
466466

467467
<!--
@@ -575,15 +575,15 @@ Scroll Snapping Alignment: the 'scroll-snap-align' property {#scroll-snap-alignm
575575
(in the sense of 'align-self' and 'justify-self'),
576576
so are consistent with that syntax.
577577
We chose to use this simpler syntax without lengths or percentages
578-
because the 'scroll-snap-area' concept already provides length offsets--
578+
because the 'scroll-snap-margin' concept already provides length offsets--
579579
but does so in a smarter way, that degrades better on small screens (see above)
580580
because it provides more information (a box, rather than a point) to the UA.
581581
We could have also added lengths here,
582582
but it would provide multiple ways to do the same thing,
583583
which is additional overhead for implementation, testing, and (most importantly) author learning.
584584
It also introduces more room for cascading errors,
585585
and guides authors in the wrong direction--
586-
away from 'scroll-snap-area'.
586+
away from 'scroll-snap-margin'.
587587
</details>
588588

589589
<h4 id="snap-scope">
@@ -1051,20 +1051,20 @@ Flow-relative Longhands for 'scroll-snap-padding' {#padding-longhands-logical}
10511051
Media: interactive
10521052
</pre>
10531053

1054-
These <a>shorthands</a> of 'scroll-snap-area-block-start' + 'scroll-snap-area-block-end'
1055-
and 'scroll-snap-area-inline-start' + 'scroll-snap-area-inline-end'
1054+
These <a>shorthands</a> of 'scroll-snap-margin-block-start' + 'scroll-snap-margin-block-end'
1055+
and 'scroll-snap-margin-inline-start' + 'scroll-snap-margin-inline-end'
10561056
are <a>longhands</a> of 'scroll-snap-padding', and
10571057
specify the block-axis and inline-axis
10581058
edges of the <a>snap viewport</a>,
10591059
respectively.
10601060
If two values are specified, the first gives the start value
10611061
and the second gives the end value.
10621062

1063-
Physical Longhands for 'scroll-snap-area' {#area-longhands-physical}
1063+
Physical Longhands for 'scroll-snap-margin' {#area-longhands-physical}
10641064
-----------------------------------------
10651065

10661066
<pre class="propdef">
1067-
Name: scroll-snap-area-top, scroll-snap-area-right, scroll-snap-area-bottom, scroll-snap-area-left
1067+
Name: scroll-snap-margin-top, scroll-snap-margin-right, scroll-snap-margin-bottom, scroll-snap-margin-left
10681068
Value: <<length>>
10691069
Initial: 0
10701070
Applies to: all elements
@@ -1074,16 +1074,16 @@ Physical Longhands for 'scroll-snap-area' {#area-longhands-physical}
10741074
Media: interactive
10751075
</pre>
10761076

1077-
These <a>longhands</a> of 'scroll-snap-area' specify
1077+
These <a>longhands</a> of 'scroll-snap-margin' specify
10781078
the top, right, bottom, and left
10791079
edges of the <a>scroll snap area</a>,
10801080
respectively.
10811081

1082-
Flow-relative Longhands for 'scroll-snap-area' {#area-longhands-logical}
1082+
Flow-relative Longhands for 'scroll-snap-margin' {#area-longhands-logical}
10831083
--------------------------------------------
10841084

10851085
<pre class="propdef">
1086-
Name: scroll-snap-area-block-start, scroll-snap-area-inline-start, scroll-snap-area-block-end, scroll-snap-area-inline-end
1086+
Name: scroll-snap-margin-block-start, scroll-snap-margin-inline-start, scroll-snap-margin-block-end, scroll-snap-margin-inline-end
10871087
Value: <<length>>
10881088
Initial: 0
10891089
Applies to: all elements
@@ -1093,13 +1093,13 @@ Flow-relative Longhands for 'scroll-snap-area' {#area-longhands-logical}
10931093
Media: interactive
10941094
</pre>
10951095

1096-
These <a>longhands</a> of 'scroll-snap-area' specify
1096+
These <a>longhands</a> of 'scroll-snap-margin' specify
10971097
the block-start, inline-start, block-end, and inline-end
10981098
edges of the <a>scroll snap area</a>,
10991099
respectively.
11001100

11011101
<pre class="propdef">
1102-
Name: scroll-snap-area-block, scroll-snap-area-inline
1102+
Name: scroll-snap-margin-block, scroll-snap-margin-inline
11031103
Value: <<length>>{1,2}
11041104
Initial: 0
11051105
Applies to: all elements
@@ -1109,9 +1109,9 @@ Flow-relative Longhands for 'scroll-snap-area' {#area-longhands-logical}
11091109
Media: interactive
11101110
</pre>
11111111

1112-
These <a>shorthands</a> of 'scroll-snap-area-block-start'/'scroll-snap-area-block-end'
1113-
and 'scroll-snap-area-inline-start'/'scroll-snap-area-inline-end'
1114-
are <a>longhands</a> of 'scroll-snap-area', and specify
1112+
These <a>shorthands</a> of 'scroll-snap-margin-block-start'/'scroll-snap-margin-block-end'
1113+
and 'scroll-snap-margin-inline-start'/'scroll-snap-margin-inline-end'
1114+
are <a>longhands</a> of 'scroll-snap-margin', and specify
11151115
the block-axis and inline-axis
11161116
edges of the <a>scroll snap area</a>,
11171117
respectively.

0 commit comments

Comments
 (0)