You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The layout of the scroll container’s contents in the example.
98
-
The snapport is represented by the red rectangle, and the snap area is represented by the yellow rectangle. Since the scroll-snap-align is “center” in the inline (horizontal) axis, a snap position is established at each scroll position which aligns the X-center of the snapport (represented by a red dotted line) with the X-center of a snap area (represented by a yellow dotted line).
99
-
</figcaption>
100
-
</figure> -->
101
-
</div>
102
-
103
74
<div class="example">
104
75
A search bar is available when the user scrolls back to the top:
Value: [ auto | start | end | center | left | right | top | bottom | <<length-percentage [0,∞]>> ]{1,2}
148
-
</pre>
149
-
150
-
This property is a shorthand property that sets all of the scroll-start-* longhands in one declaration.
151
-
The first value defines the scroll starting point in the block axis,
152
-
the second sets it in the inline axis. If the second value is omitted, it defaults to ''scroll-start/start''. If ''scroll-start-target'' is set on any child, 'scroll-start' is not used, in favor of using the element as the offset.
Values corresponding to a length greater than the width/height of the scrollport
167
-
are valid,
168
-
but clamped to the width/height of the scrollport.
169
-
170
-
<dt><dfn>start</dfn>
171
-
<dt><dfn>center</dfn>
172
-
<dt><dfn>end</dfn>
173
-
<dd>
174
-
Equivalent to ''0%'', ''50%'', and ''100%'', respectively.
175
-
</dl>
176
-
177
-
<h4 id="display-none-behavior">
178
-
Interaction with ''display: none'' and initial creation</h4>
179
-
180
-
Same behavior that animations follow with [[#first-layout]].
181
-
182
-
<h4 id="slow-page-load-behavior">
183
-
Slow page loading or document streaming behavior</h4>
184
-
185
-
TODO
186
-
187
-
<h4 id="fragment-navigation-behavior">
188
-
Interaction with "fragment navigation"</h4>
189
-
190
-
TODO
191
-
192
-
If the scrollport has a in-page '':target'' via a URL fragment or a previous scroll position, then 'scroll-start' is unused. Existing target logic should go unchanged. This makes 'scroll-start' a soft request in the scroll position resolution routines.
193
-
194
-
<h4 id="place-content-behavior">
195
-
Interaction with 'place-content'</h4>
196
-
197
-
TODO
198
-
199
-
Note: While 'place-content' can make a scroller appear to start in the center
200
-
or end, no browser supports it and it appears complicated to resolve.
201
-
202
-
<h4 id="find-in-page-behavior">
203
-
Interaction with "find in page"</h4>
204
-
205
-
TODO
206
-
207
-
<h4 id="scroll-snap-container-behavior">
208
-
Interaction with "scroll-snap" containers</h4>
209
-
210
-
This effectively will layout and start scroll at the snapped child, thus negating / cancelling 'scroll-start'. 'scroll-start' will only work if nothing else has effected the scroll position.
211
-
212
-
<h4 id="nested-scrollers">
213
-
Nested scrollers with 'scroll-start'</h4>
214
-
215
-
Should follow patterns that scroll snap has set.
216
-
217
-
<h4 id="toggling-display-none">
218
-
Interaction when 'display' is toggled</h4>
219
-
220
-
Same behavior that animations follow with [[#first-layout]].
221
-
222
-
<h4 id="rtl">
223
-
Interaction with RTL and LTR</h4>
224
-
225
-
Logical properties are offered for length offsets that should be flow relative. Furthermore, the ''end'' and ''start'' keywords are always logical.
226
-
227
111
The 'scroll-start-target' property {#scroll-start-target}
228
112
-------------------------------------------
229
113
@@ -289,7 +173,7 @@ Interaction with 'place-content'</h4>
289
173
<h4 id="scroll-start-fragment-navigation">
290
174
Post-first layout arrivals</h4>
291
175
292
-
While the document is being [[html#updating-the-document|updated],
176
+
While the document is being [[html#updating-the-document|updated]],
293
177
a <a>scroll container's</a>[=initial scroll target=] might arrive
294
178
after that <a>scroll container</a> has been laid out.
0 commit comments