Skip to content

Commit cb24c2d

Browse files
committed
[css-scroll-snap] Define scroll snap container, use it.
1 parent 250fda0 commit cb24c2d

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

css-scroll-snap/Overview.bs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ Scroll Snapping Rules: the 'scroll-snap-type' property {#snap-type}
219219
</pre>
220220

221221
The 'scroll-snap-type' property is used to specify
222-
whether and how strictly <a>snap positions</a> are intepreted on the <a>scroll container</a>,
222+
whether a <a>scroll container</a> is a <a>scroll snap container</a>,
223+
how strictly <a>snap positions</a> are intepreted on the <a>scroll container</a>,
223224
and which axes are considered.
224225

225226
Issue: <a href="https://lists.w3.org/Archives/Public/www-style/2015Nov/0328.html">We're considering splitting this into subproperties.</a>
@@ -295,6 +296,16 @@ Scroll Snapping Rules: the 'scroll-snap-type' property {#snap-type}
295296
the UA must re-snap to it.
296297
</dl>
297298

299+
A box <dfn export>captures snap positions</dfn>
300+
if it is a <a>scroll container</a>
301+
or has a value other than ''scroll-snap-type/none'' for 'scroll-snap-type'.
302+
If a box's nearest <a lt="captures snap positions">snap-position capturing</a> ancestor
303+
on its containing block chain
304+
is a <a>scroll container</a> with a non-''scroll-snap-type/none'' value for 'scroll-snap-type',
305+
that is the box's <dfn export local-lt="snap container">scroll snap container</dfn>.
306+
Otherwise, the box has no <a>scroll snap container</a>
307+
and its <a>snap positions</a> do not cause snapping.
308+
298309
Advisement:
299310
Authors should use mandatory snap positions with consideration of
300311
varyingly-sized screens and (if applicable) varying-sized content.
@@ -489,7 +500,7 @@ Scroll Snapping Alignment: the 'scroll-snap-align' property {#scroll-snap-alignm
489500

490501
Specifies the element's <a>snap position</a> as an alignment of
491502
its <a>snap area</a> (as the <a>alignment subject</a>)
492-
within the viewport's <a>snap viewport</a> (as the <a>alignment container</a>).
503+
within its <a>snap container's</a> <a>snap viewport</a> (as the <a>alignment container</a>).
493504
The two values specify the snapping behavior in the <a>inline axis</a> and <a>block axis</a>,
494505
respectively.
495506
If only one value is specified,

0 commit comments

Comments
 (0)