Skip to content

Commit 6a8a474

Browse files
committed
Merge pull request w3c#89 from ChumpChief/master
[css-snappoints] A few minor updates plus clarification of post-content snapping
2 parents fae5b02 + c9ced67 commit 6a8a474

2 files changed

Lines changed: 135 additions & 73 deletions

File tree

css-snappoints/Overview.bs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
6464
sizes vary. Using mandatory element-based snap
6565
positions, scrolling will always complete with an image centered in the <a>scroll container's</a> visual viewport.
6666

67-
<pre>
67+
<pre class="lang-css">
6868
img {
6969
/* Specifies that the center of each photo
7070
should align with the center of the scroll
@@ -83,7 +83,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
8383
}
8484
</pre>
8585

86-
<pre>
86+
<pre class="lang-html">
8787
&lt;div class="photoGallery">
8888
&lt;img src="img1.jpg">
8989
&lt;img src="img2.jpg">
@@ -110,7 +110,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
110110
to snap one page at a time). However, if a scrolling operation would finish near a snap position, then the scroll will be adjusted to
111111
align the page as specified.
112112

113-
<pre>
113+
<pre class="lang-css">
114114
.page {
115115
/* Defines the top of each page as the
116116
edge that should be used for snapping */
@@ -129,7 +129,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
129129
}
130130
</pre>
131131

132-
<pre>
132+
<pre class="lang-html">
133133
&lt;div class="docScroller">
134134
&lt;div class="page">Page 1&lt;/div>
135135
&lt;div class="page">Page 2&lt;/div>
@@ -194,7 +194,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
194194

195195
<h2 id="scroll-snap-type">Scroll Snap Types: the 'scroll-snap-type' property</h2>
196196

197-
The ''scroll-snap-type'' property defines how strictly a <a>scroll container's</a> visual viewport should rest on <a>snap positions</a>. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap position; this is left up to the user agent.
197+
The ''scroll-snap-type'' property defines how strictly a <a>scroll container's</a> visual viewport should rest on <a>snap positions</a>. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap positions; this is left up to the user agent.
198198

199199
<p class="issue">
200200
<a href="https://lists.w3.org/Archives/Public/www-style/2015Nov/0328.html">Open issue</a> on whether to enhance the scroll-snap-type property for specifying the axis or adding a second property. We have <a href="https://lists.w3.org/Archives/Public/www-style/2015Dec/0048.html">resolved</a> that this functionality be added once the issue is resolved.
@@ -208,7 +208,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
208208
Inherited: no
209209
Percentages: n/a
210210
Media: interactive
211-
Computed value: specified value
211+
Computed value: as specified
212212
Animatable: no
213213
</pre>
214214

@@ -219,11 +219,15 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
219219

220220
<dt><dfn>mandatory</dfn>
221221
<dd>
222-
The visual viewport of this <a>scroll container</a> is guaranteed to rest on a snap position when there are no active scrolling operations. That is, it must come to rest on a snap position at the termination of a scroll, if a valid, reachable snap position exists. If no valid, reachable snap position exists then no snapping occurs. If the content changes such that the visual viewport would no longer rest on a snap position (e.g. content is added, moved, deleted, resized), the scroll offset must be modified to maintain this guarantee.
222+
The visual viewport of this <a>scroll container</a> is guaranteed to rest on a snap position when there are no active scrolling operations. That is, it must come to rest on a snap position at the termination of a scroll, if a valid, reachable snap position exists. If no valid, reachable snap position exists then no snapping occurs.
223+
224+
If the content changes such that the visual viewport would no longer rest on a snap position (e.g. content is added, moved, deleted, resized), the scroll offset must be modified to maintain alignment of the visual viewport with a snap position. If the visual viewport was already aligned with a snap position prior to the content change and that snap position still exists (e.g. its associated element was not deleted), that same snap position must be satisfied after the content change.
223225

224226
<dt><dfn>proximity</dfn>
225227
<dd>
226-
The visual viewport of this <a>scroll container</a> may come to rest on a snap position at the termination of a scroll at the discretion of the UA given the parameters of the scroll. If the content changes such that the visual viewport would no longer rest on a snap position (e.g. content is added, moved, deleted, resized), the scroll offset may be modified to maintain this guarantee.
228+
The visual viewport of this <a>scroll container</a> may come to rest on a snap position at the termination of a scroll at the discretion of the UA given the parameters of the scroll.
229+
230+
If the content changes such that the visual viewport would no longer rest on a snap position (e.g. content is added, moved, deleted, resized), the scroll offset may be modified to maintain alignment of the visual viewport with a snap position. If the visual viewport was already aligned with a snap position prior to the content change and that snap position still exists (e.g. its associated element was not deleted) and if the user agent elects to modify the scroll offset to maintain snap position alignment, that same snap position should be satisfied after the content change.
227231
</dl>
228232

229233
<h2 id="scroll-snap-padding">Scroll Snap Padding: the 'scroll-snap-padding' property</h2>
@@ -238,7 +242,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
238242
Inherited: no
239243
Percentages: relative to the scroll container's visual viewport
240244
Media: interactive
241-
Computed value: specified value, with lengths made absolute
245+
Computed value: as specified, with lengths made absolute
242246
Animatable: yes
243247
</pre>
244248

@@ -262,7 +266,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain
262266
Inherited: no
263267
Percentages: relative to the specified element box
264268
Media: interactive
265-
Computed value: specified value, with lengths made absolute
269+
Computed value: as specified, with lengths made absolute
266270
Animatable: yes
267271
</pre>
268272

0 commit comments

Comments
 (0)