Skip to content

Commit d3894ce

Browse files
committed
[css-scroll-snap] Redefine repeat() syntax in terms of snap areas, to handle overlarge snap intervals.
1 parent cbffb69 commit d3894ce

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

css-scroll-snap/Overview.bs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -359,29 +359,35 @@ Scroll Snapping Coordinates: the 'scroll-snap-points-x' and 'scroll-snap-points-
359359
</pre>
360360

361361
The 'scroll-snap-points-x' and 'scroll-snap-points-y' properties
362-
are used to define the positioning of explicit <a>snap positions</a>
363-
as coordinates within the <a>scrollable area</a> of the <a>scroll container</a>.
362+
are used to define <a>snap positions</a>
363+
by specifying coordinates against the <a>scrollable area</a> of the <a>scroll container</a>.
364364

365365
<dl dfn-type="value" dfn-for="snap-points-x, snap-points-y">
366366
<dt><dfn>none</dfn>
367367
<dd>
368-
No <a>snap positions</a> are defined by this <a>scroll container</a>.
369-
Contained elements may still define <a>snap positions</a> on this <a>scroll container's</a> behalf.
368+
No <a>snap areas</a> are defined by this <a>scroll container</a>.
369+
Contained elements may still define <a>snap areas</a> on this <a>scroll container's</a> behalf.
370370

371371
<dt><dfn>repeat([ <<length>> | <<percentage>> ])</dfn>
372372
<dd>
373-
Defines <a>snap position</a> that span the <a>scrollable area</a> in the appropriate axis,
374-
starting from the <a>start</a> edge of the <a>scrollable area</a> and recurring every <<length>> distance throughout the <a>scrollable area</a>.
373+
Defines start-<a href="#scroll-snap-alignment">aligned</a> <a>snap areas</a>
374+
that span the <a>scrollable area</a> in the appropriate axis,
375+
starting from the <a>start</a> edge of the <a>scrollable area</a>
376+
and spanning across every <<length>> throughout the <a>scrollable area</a>.
375377

376378
Negative values are invalid.
377379
User agents must define a UA-defined minimum <<length>> greater than 0
378380
(recommended ''1px''),
379-
and clamp the computed value to that minimum.
381+
and clamp the used value to that minimum.
380382
</dl>
381383

382384
Coordinates specified by 'scroll-snap-points-x' and 'scroll-snap-points-y'
383385
are not affected by 'scroll-snap-padding'/'scroll-snap-destination'.
384386

387+
Issue: Or should they also be affected by 'scroll-snap-padding'?
388+
Also we're effectively assuming start-alignment here, is that what we want?
389+
Or do we want to allow other alignments?
390+
385391
Issue: Should we add <css>start-edge</css> and <css>end-edge</css> keywords here, so that the start and end of the scrollable area can be defined as reachable?
386392
This would be good for e.g. maps.
387393
(See <a href="https://lists.w3.org/Archives/Public/www-style/2015Jul/0453.html">Matt Rakow's take</a> on not having <css>start</css> or <css>end</css> here.)
@@ -395,7 +401,7 @@ Scroll Snapping Coordinates: the 'scroll-snap-points-x' and 'scroll-snap-points-
395401
Element-based Snapping {#element}
396402
======================
397403

398-
Scroll Snapping Area: the 'scroll-snap-area' property {#the-scroll-snap-area}
404+
Scroll Snapping Area: the 'scroll-snap-area' property {#scroll-snap-areas}
399405
---------------------
400406

401407
<pre class="propdef">
@@ -417,7 +423,7 @@ Scroll Snapping Area: the 'scroll-snap-area' property {#the-scroll-snap-area}
417423
all of the <a href="#longhands"><css>scroll-snap-area-*</css> longhands</a>
418424
in one declaration.
419425

420-
Scroll Snapping Alignment: the 'scroll-snap-align' property {#scroll-snap-align}
426+
Scroll Snapping Alignment: the 'scroll-snap-align' property {#scroll-snap-alignment}
421427
--------------------------
422428

423429
<pre class="propdef">

0 commit comments

Comments
 (0)