Skip to content

Commit bcb1027

Browse files
committed
[css-align] Loosen the abspos default overflow rules to work on anything that's not normal-aligned (per discussion with @fantasai and @bfgeek). Fix references to 'original containing block' to be the bounding rect of the OCB and IMCB, to correctly handle cases where the IMCB is partially or completely outside the OCB.
1 parent e143edf commit bcb1027

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

css-align-3/Overview.bs

+15-17
Original file line numberDiff line numberDiff line change
@@ -897,33 +897,31 @@ Content Distribution for Scroll Containers</h5>
897897
<h5 id=auto-safety-position>
898898
Self-Alignment for Absolutely Positioned Boxes</h5>
899899

900-
For [=absolutely positioned=] [=alignment subjects=] whose
901-
902-
* relevant [=self-alignment property=] is not ''justify-self/normal'' and
903-
* whose 'inset-area' property successfully defines an [=inset-area grid=],
904-
or whose [=self-alignment property=] is ''anchor-center''
905-
(aka, the element is "using" Anchor Positioning in some way)
906-
900+
For [=absolutely positioned=] [=alignment subjects=]
901+
whose relevant [=self-alignment property=] is not ''justify-self/normal'',
907902
the default [=overflow alignment=] behavior is as follows:
908903

909-
1. If the [=alignment subject=] overflows its [=inset-modified containing block=]
904+
1. Let the |default overflow rect| be the bounding rectangle
905+
of the [=alignment subject's=] [=inset-modified containing block=]
906+
and its [=original containing block=].
907+
2. If the [=alignment subject=] overflows its [=inset-modified containing block=]
910908
(its normal [=alignment container=]),
911-
but does not overflow its [=original containing block=]
909+
but does not overflow |default overflow rect|
912910
align as specified (''unsafe'').
913-
2. If the <em>size</em> of the [=alignment subject=]
914-
fits within its [=original containing block=],
915-
but its specified alignment would cause it to overflow the [=original containing block=],
911+
3. If the <em>size</em> of the [=alignment subject=]
912+
fits within the |default overflow rect|,
913+
but its specified alignment would cause it to overflow the |default overflow rect|,
916914
it is instead shifted the minimum amount
917-
to stay within the [=original containing block=]
915+
to stay within the |default overflow rect|
918916
while honoring the alignment as much as possible
919917
(i.e., flush with the edge of the [=original containing block=]
920918
it was trying to overflow over).
921-
3. If the size of the [=alignment subject=]
922-
overflows the [=original containing block=],
923-
it is instead start-aligned within the [=original containing block=]
919+
4. If the size of the [=alignment subject=]
920+
overflows the |default overflow rect|,
921+
it is instead start-aligned within the |default overflow rect|
924922
(similar to ''safe'').
925923

926-
(For [=absolutely-positioned=] [=alignment subjects=] that fail the above conditions,
924+
(For [=absolutely-positioned=] [=alignment subjects=] that fail the above condition,
927925
see [[#auto-safety-default]].)
928926

929927
<h5 id=auto-safety-default>

0 commit comments

Comments
 (0)