@@ -747,7 +747,8 @@ Resolvings Insets for the “Inset-Modified Containing Block”</h4>
747
747
is reduced (possibly becoming negative)
748
748
to bring that size up to zero.
749
749
In the case that only one inset is ''auto'' ,
750
- that is the <dfn>weaker inset</dfn> ;
750
+ that is the <dfn>weaker inset</dfn>
751
+ (whose opposite inset is the <dfn>stronger inset</dfn> );
751
752
otherwise the [=weaker inset=] is the inset of the [=end=] edge
752
753
(where [=end=] is interpreted relative to the [=writing mode=] of the [=containing block=] ).
753
754
@@ -901,15 +902,8 @@ Absolute Positioning Layout Model</h2>
901
902
see [[#abspos-margins]] .
902
903
903
904
<li>
904
- Lastly, its [=margin box=] is aligned within the [=inset-modified containing block=]
905
- as defined by its [=self-alignment properties=] .
906
-
907
- For this purpose, if neither ''<overflow-position>/safe'' nor ''<overflow-position>/unsafe'' is specified,
908
- the box aligns at an “in-between” level of safety:
909
- it is ''unsafe'' -aligned within its [=inset-modified containing block=] ,
910
- but shifted, if necessary, to not overflow
911
- the union of its [=original containing block=] and its [=inset-modified containing block=] --
912
- unless it is larger than that rectangle, in which case it is start-aligned to it.
905
+ Lastly, its [=margin box=] is aligned within the [=inset-modified containing block=] ,
906
+ see [[#abspos-alignment]] .
913
907
</ol>
914
908
915
909
<h3 id="abspos-auto-size">
@@ -975,6 +969,27 @@ Auto Margins of Absolutely-Positioned Boxes</h3>
975
969
the space distributed to ''margin/auto'' [=margins=]
976
970
can be negative in [=absolute positioning=] .
977
971
972
+ <h2 id=abspos-alignment>
973
+ Self-Alignment of Absolutely Positioned Boxes</h2>
974
+
975
+ If the [=computed value=] of either [=inset property=] in an axis is ''inset/auto'' ,
976
+ then its [=margin box=] is aligned to the edge of the [=inset-modified containing block=]
977
+ corresponding to its [=stronger inset=]
978
+ (even if this would overflow its [=containing block=] ).
979
+
980
+ Otherwise, if either [=margin=] is ''margin/auto'' ,
981
+ its position is resolved according to [[#abspos-margins]] .
982
+
983
+ Otherwise, the box is aligned as specified by
984
+ its [=self-alignment property=] in the relevant axis
985
+ (as defined by the [=writing mode=] of the [=containing block=] ),
986
+ using its [=margin box=] as the [=alignment subject=]
987
+ and the [=inset-modified containing block=] as the [=alignment container=] .
988
+ However, if an explicit [=overflow alignment=] is not specified
989
+ and its [=margin box=] overflows the [=inset-modified containing block=] ,
990
+ its alignment is adjusted to minimize overflow
991
+ as specified in [[css-align-3#auto-safety-position]] .
992
+
978
993
<h2 id="abspos-old">
979
994
Old Absolute Positioning Layout Model</h2>
980
995
0 commit comments