@@ -897,7 +897,7 @@ Content Distribution for Scroll Containers</h5>
897
897
<h5 id=auto-safety-position>
898
898
Self-Alignment for Absolutely Positioned Boxes</h5>
899
899
900
- For [=absolutely positioned=] [=alignment subjects=]
900
+ For [=absolutely positioned=] [=alignment subjects=]
901
901
whose relevant [=self-alignment property=] is not ''justify-self/normal'' ,
902
902
the default [=overflow alignment=] behavior is as follows:
903
903
@@ -1171,30 +1171,24 @@ Content-Distribution Shorthand: the 'place-content' property</h3>
1171
1171
in which case it is defaulted to ''start'' .
1172
1172
1173
1173
<h3 id="overflow-scroll-position">
1174
- Overflow and Scroll Positions </h3>
1174
+ Alignment Overflow and Scroll Containers </h3>
1175
1175
1176
1176
When the <a>content-distribution properties</a> are set
1177
1177
on a <a>scroll container</a> with an overflowing <a>alignment subject</a> ,
1178
- rather than shifting the layout positions of its content,
1179
- they instead change its <a>initial scroll position</a>
1180
- so that the initially-visible content
1181
- of the <a>scroll container</a>
1182
- satisfies the [[#alignment-values|expected alignment]]
1183
- of the <a>alignment subject</a> and <a>alignment container</a> .
1184
- However, the [[css-scroll-snap-2#scroll-initial-target-with-place-content|scroll-initial-target]]
1185
- property, when present, overrides the <a>content-distribution properties</a>
1186
- in determining the <a>initial scroll position</a> .
1187
-
1188
- Note: The presence of scrollbars can change the size of the [=scroll container’s=] content box,
1189
- and thus the size of the [=alignment container=]
1190
- and/or [=alignment subject=] .
1178
+ they reduce the clipping of the [=negative scrollable overflow region=]
1179
+ just enough to ensure that <a>alignment subject</a> can be scrolled
1180
+ into its ''align-content/start'' -aligned position.
1191
1181
1192
1182
<div class='example'>
1193
1183
For example,
1194
1184
if a scrollable flex container is set to ''justify-content: flex-end''
1195
1185
(or ''justify-content: flex-start'' with ''flex-flow: row-reverse'' ),
1196
- it will be initially displayed scrolled all the way to the main-end edge of its content,
1186
+ its [=in-flow=] content will be initially positioned
1187
+ to align the main-end edge of its content to the main-end edge of the flex container,
1197
1188
and its content will appear to overflow its main-start edge.
1189
+ However, the viewer will be able to scroll <em> up</em>
1190
+ to view the overflowing [=in-flow=] content,
1191
+ just as if ''justify-content: flex-start'' had been specified.
1198
1192
</div>
1199
1193
1200
1194
<figure>
@@ -1204,17 +1198,16 @@ Overflow and Scroll Positions</h3>
1204
1198
</figcaption>
1205
1199
</figure>
1206
1200
1207
- None of this changes how scroll coordinates are assigned:
1208
- the origin is still where it would be in a ''align-content/start'' -aligned container,
1209
- it just might be initially positioned outside the <a>scrollport</a> .
1210
-
1211
1201
Note: The <a>alignment subject</a> is not necessarily
1212
1202
identical to the <a>scrollable overflow area</a> :
1213
- content overflowing the <a>alignment subject</a> ,
1214
- such as an absolutely-positioned or out-of-flow element,
1215
- grows the <a>scrollable overflow area</a> but not the <a>alignment subject</a> ,
1216
- thus an ''align-content/end'' -aligned <a>scroll container</a>
1217
- might not be initially scrolled all the way to the bottom.
1203
+ content overflowing the <a>alignment subject</a> --
1204
+ such as an [=out-of-flow=] box--
1205
+ grows the <a>scrollable overflow area</a> but not the <a>alignment subject</a> .
1206
+ Thus an ''align-content/end'' -aligned <a>scroll container</a>
1207
+ might not be initially scrolled all the way to the bottom,
1208
+ and positioned content can still be clipped
1209
+ if it is further into the [=negative scrollable overflow region=]
1210
+ than the [=in-flow=] content forming the [=alignment subject=] .
1218
1211
1219
1212
<figure>
1220
1213
<img src="images/scroll-align-overflow.jpg" alt="">
@@ -1226,6 +1219,10 @@ Overflow and Scroll Positions</h3>
1226
1219
</figcaption>
1227
1220
</figure>
1228
1221
1222
+ Note: The presence of scrollbars can change
1223
+ the size of the [=scroll container’s=] [=content box=] --
1224
+ and thus the size of the [=alignment container=]
1225
+ and/or [=alignment subject=] .
1229
1226
1230
1227
<h3 id="baseline-align-content">
1231
1228
Baseline Content-Alignment</h3>
@@ -2523,6 +2520,9 @@ Changes</h2>
2523
2520
<a href="https://github.com/w3c/csswg-drafts/issues/9960">Issue 9960</a> )
2524
2521
<li> Make all the ''space-*'' keywords fallback to ''safe'' overflow.
2525
2522
(<a href="https://github.com/w3c/csswg-drafts/issues/10154">Issue 10154</a> )
2523
+ <li> Clearly define the interaction of overflowing [=content distribution=] and [=scroll containers=]
2524
+ to not impact layout, but to only affect the extent of the [=scrollable overflow area=] .
2525
+ (<a href="https://github.com/w3c/csswg-drafts/issues/4957">Issue 4957</a> )
2526
2526
<li> Only apply the special margin-edge baseline rule for [=scroll container=] [=block containers=]
2527
2527
when 'baseline-source' is its [=initial value=] .
2528
2528
(<a href="https://github.com/w3c/csswg-drafts/issues/8214">Issue 8214</a> )
0 commit comments