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
beyond the <ahref=#algo-flex-order>reordering step</a>.</p>
772
772
773
773
<p>The static position of an absolutely-positioned child of a <adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>
774
-
is determined by the <aclass=propertydata-link-type=propdesctitle=justify-*>justify-*</a>/<aclass=propertydata-link-type=propdesctitle=align-*>align-*</a> properties set on the <adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a> and the child:</p>
774
+
is determined such that the child is positioned
775
+
as if it were the sole <adata-link-type=dfnhref=#flex-itemtitle="flex item">flex item</a> in the <adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>,
776
+
assuming both the child and the flex container
777
+
were fixed-size boxes of their used size.</p>
778
+
779
+
<p>In other words,
780
+
if the static position were conceived of as a point to which the absolutely-positioned element is aligned,
781
+
the static position of an absolutely-positioned child of a <adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>
782
+
is determined by the alignment properties set on the <adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a> and the child
783
+
as if it were a zero-height, zero-width only-child in-flow flex item.
784
+
Furthermore, the absolutely-positioned child aligns itself in the given axis
785
+
to the static position in the same way:</p>
775
786
776
787
<dl>
788
+
777
789
<dt>In the <adata-link-type=dfnhref=#main-axistitle="main axis">main axis</a>
778
790
<dd>
779
791
If the <adata-link-type=dfnhref=#flex-containertitle="flex container’s">flex container’s</a><aclass=propertydata-link-type=propdeschref=#propdef-justify-contenttitle=justify-content>justify-content</a> value
780
-
would distribute a single <adata-link-type=dfnhref=#flex-itemtitle="flex item">flex item</a>
792
+
would align a single <adata-link-type=dfnhref=#flex-itemtitle="flex item">flex item</a>
781
793
to the start, center, or end side of the <adata-link-type=dfnhref=#main-axistitle="main axis">main axis</a>,
782
-
the static position in the <adata-link-type=dfnhref=#main-axistitle="main axis">main axis</a> is the start, center, or end respectively.
794
+
the static position in the <adata-link-type=dfnhref=#main-axistitle="main axis">main axis</a> is the start, center, or end of the flex container’s content box, respectively,
795
+
and the absolutely-positioned box aligns its outer start, center, or end to the static position point, respectively.
783
796
784
797
<dt>In the <adata-link-type=dfnhref=#cross-axistitle="cross axis">cross axis</a>
785
798
<dd>
786
799
If the child’s <aclass=propertydata-link-type=propdeschref=#propdef-align-selftitle=align-self>align-self</a> value,
787
800
if specified on a hypothetical single <adata-link-type=dfnhref=#flex-itemtitle="flex item">flex item</a> child of the <adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>,
788
801
would align that hypothetical child to the start, center, or end side of the <adata-link-type=dfnhref=#cross-axistitle="cross axis">cross axis</a>,
789
-
the static position in the <adata-link-type=dfnhref=#cross-axistitle="cross axis">cross axis</a> is the start, center, or end respectively.
802
+
the static position in the <adata-link-type=dfnhref=#cross-axistitle="cross axis">cross axis</a> is the start, center, or end of the flex container’s content box, respectively,
803
+
and the absolutely-positioned box aligns its outer start, center, or end to the static position point, respectively.
790
804
</dl>
791
805
792
-
<p>Further, the absolutely-positioned child aligns its start, center, or end in the given axis
793
-
(whichever position the static position was set to)
794
-
to the static position.</p>
795
-
796
806
<divclass=example>
797
807
The effect of this is that if you set, for example,
798
808
<aclass=cssdata-link-type=propdeschref=#propdef-align-contenttitle=align-content>align-content: center;</a> on an absolutely-positioned child of a <adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>,
0 commit comments