Skip to content

Commit 6fe8590

Browse files
committed
[css-position-3] Be consistent with css-align-3 that auto insets are stronger than self-alignment w3c#11902
1 parent 5aae74e commit 6fe8590

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

css-position-3/Overview.bs

+25-10
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,8 @@ Resolvings Insets for the “Inset-Modified Containing Block”</h4>
747747
is reduced (possibly becoming negative)
748748
to bring that size up to zero.
749749
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>);
751752
otherwise the [=weaker inset=] is the inset of the [=end=] edge
752753
(where [=end=] is interpreted relative to the [=writing mode=] of the [=containing block=]).
753754

@@ -901,15 +902,8 @@ Absolute Positioning Layout Model</h2>
901902
see [[#abspos-margins]].
902903

903904
<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]].
913907
</ol>
914908

915909
<h3 id="abspos-auto-size">
@@ -975,6 +969,27 @@ Auto Margins of Absolutely-Positioned Boxes</h3>
975969
the space distributed to ''margin/auto'' [=margins=]
976970
can be negative in [=absolute positioning=].
977971

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+
978993
<h2 id="abspos-old">
979994
Old Absolute Positioning Layout Model</h2>
980995

0 commit comments

Comments
 (0)