@@ -42,7 +42,7 @@ Use Cases {#use-cases}
42
42
:root { scroll-snap-type: proximity; }
43
43
h1, h2, h3, h4, h5, h6 {
44
44
scroll-snap-align: start;
45
- scroll-snap-area : 0.25em;
45
+ scroll-snap-margin : 0.25em;
46
46
}
47
47
</pre>
48
48
@@ -160,7 +160,7 @@ On the children:
160
160
<td> High priority
161
161
<tr>
162
162
<td> n/a
163
- <td> ''scroll-snap-area : <<length>>{1,4}''
163
+ <td> ''scroll-snap-margin : <<length>>{1,4}''
164
164
<td> High priority
165
165
</table>
166
166
@@ -177,7 +177,7 @@ Scroll Snapping Model {#snap-model}
177
177
178
178
Valid <a>snap positions</a> can be specified
179
179
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)
181
181
within the <a>scroll container</a> ’s <a>snap viewport</a>
182
182
(its viewport, as reduced by 'scroll-snap-padding' ).
183
183
This is conceptually equivalent to specifying the alignment of
@@ -435,11 +435,11 @@ Element-based Snapping {#element}
435
435
██ ██ ██ ██ ████████ ██ ██
436
436
-->
437
437
438
- Scroll Snapping Area: the 'scroll-snap-area ' property {#scroll-snap-areas}
438
+ Scroll Snapping Area: the 'scroll-snap-margin ' property {#scroll-snap-areas}
439
439
---------------------
440
440
441
441
<pre class="propdef">
442
- Name : scroll-snap-area
442
+ Name : scroll-snap-margin
443
443
Value : <<length>>{1,4}
444
444
Initial : 0
445
445
Applies to : all elements
@@ -451,17 +451,17 @@ Scroll Snapping Area: the 'scroll-snap-area' property {#scroll-snap-areas}
451
451
452
452
Specifies the <dfn lt="scroll snap area" local-lt="snap area">scroll snap area</dfn>
453
453
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' ).
455
456
The <a>scroll snap area</a> is the bounding box of the transformed border box,
457
+ plus the specified outsets,
456
458
in the <a>scroll container’s</a> coordinate space.
457
- Outsets are applied to the bounding box,
458
- not the border box.
459
459
460
460
Note: This ensures that the <a>scroll snap area</a> is always rectangular and axis-aligned
461
461
to the <a>scroll container’s</a> coordinate space.
462
462
463
463
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>
465
465
in one declaration.
466
466
467
467
<!--
@@ -575,15 +575,15 @@ Scroll Snapping Alignment: the 'scroll-snap-align' property {#scroll-snap-alignm
575
575
(in the sense of 'align-self' and 'justify-self' ),
576
576
so are consistent with that syntax.
577
577
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--
579
579
but does so in a smarter way, that degrades better on small screens (see above)
580
580
because it provides more information (a box, rather than a point) to the UA.
581
581
We could have also added lengths here,
582
582
but it would provide multiple ways to do the same thing,
583
583
which is additional overhead for implementation, testing, and (most importantly) author learning.
584
584
It also introduces more room for cascading errors,
585
585
and guides authors in the wrong direction--
586
- away from 'scroll-snap-area ' .
586
+ away from 'scroll-snap-margin ' .
587
587
</details>
588
588
589
589
<h4 id="snap-scope">
@@ -1051,20 +1051,20 @@ Flow-relative Longhands for 'scroll-snap-padding' {#padding-longhands-logical}
1051
1051
Media : interactive
1052
1052
</pre>
1053
1053
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'
1056
1056
are <a>longhands</a> of 'scroll-snap-padding' , and
1057
1057
specify the block-axis and inline-axis
1058
1058
edges of the <a>snap viewport</a> ,
1059
1059
respectively.
1060
1060
If two values are specified, the first gives the start value
1061
1061
and the second gives the end value.
1062
1062
1063
- Physical Longhands for 'scroll-snap-area ' {#area-longhands-physical}
1063
+ Physical Longhands for 'scroll-snap-margin ' {#area-longhands-physical}
1064
1064
-----------------------------------------
1065
1065
1066
1066
<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
1068
1068
Value : <<length>>
1069
1069
Initial : 0
1070
1070
Applies to : all elements
@@ -1074,16 +1074,16 @@ Physical Longhands for 'scroll-snap-area' {#area-longhands-physical}
1074
1074
Media : interactive
1075
1075
</pre>
1076
1076
1077
- These <a>longhands</a> of 'scroll-snap-area ' specify
1077
+ These <a>longhands</a> of 'scroll-snap-margin ' specify
1078
1078
the top, right, bottom, and left
1079
1079
edges of the <a>scroll snap area</a> ,
1080
1080
respectively.
1081
1081
1082
- Flow-relative Longhands for 'scroll-snap-area ' {#area-longhands-logical}
1082
+ Flow-relative Longhands for 'scroll-snap-margin ' {#area-longhands-logical}
1083
1083
--------------------------------------------
1084
1084
1085
1085
<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
1087
1087
Value : <<length>>
1088
1088
Initial : 0
1089
1089
Applies to : all elements
@@ -1093,13 +1093,13 @@ Flow-relative Longhands for 'scroll-snap-area' {#area-longhands-logical}
1093
1093
Media : interactive
1094
1094
</pre>
1095
1095
1096
- These <a>longhands</a> of 'scroll-snap-area ' specify
1096
+ These <a>longhands</a> of 'scroll-snap-margin ' specify
1097
1097
the block-start, inline-start, block-end, and inline-end
1098
1098
edges of the <a>scroll snap area</a> ,
1099
1099
respectively.
1100
1100
1101
1101
<pre class="propdef">
1102
- Name : scroll-snap-area -block, scroll-snap-area -inline
1102
+ Name : scroll-snap-margin -block, scroll-snap-margin -inline
1103
1103
Value : <<length>>{1,2}
1104
1104
Initial : 0
1105
1105
Applies to : all elements
@@ -1109,9 +1109,9 @@ Flow-relative Longhands for 'scroll-snap-area' {#area-longhands-logical}
1109
1109
Media : interactive
1110
1110
</pre>
1111
1111
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
1115
1115
the block-axis and inline-axis
1116
1116
edges of the <a>scroll snap area</a> ,
1117
1117
respectively.
0 commit comments