Skip to content

Commit bd47fee

Browse files
committed
Shift paragraph describing the use of static position above its calculation, and make note about intentions more precise.
1 parent 23cb7a8 commit bd47fee

2 files changed

Lines changed: 63 additions & 45 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,23 @@ <h3 id=abspos-items><span class=secno>4.1. </span> Absolutely-Positioned
10031003
computed from its <dfn id=flex-item-static-position>static position</dfn>,
10041004
as follows:
10051005

1006+
<p> If both ‘<code class=property>left</code>’ and ‘<code
1007+
class=property>right</code>’ are ‘<a href="#align-self-auto"><code
1008+
class=css>auto</code></a>’, the <a href="#flex-item"><i>flex
1009+
item</i></a> must be positioned so that its <a
1010+
href="#main-start"><i>main-start</i></a> or <a
1011+
href="#cross-start"><i>cross-start</i></a> edge (whichever is in the
1012+
horizontal axis) is aligned with the <a
1013+
href="#flex-item-static-position"><i>static position</i></a>. If both
1014+
<code class=property>top</code>’ and ‘<code
1015+
class=property>bottom</code>’ are ‘<a href="#align-self-auto"><code
1016+
class=css>auto</code></a>’, the <a href="#flex-item"><i>flex
1017+
item</i></a> must be positioned so that its <a
1018+
href="#main-start"><i>main-start</i></a> or <a
1019+
href="#cross-start"><i>cross-start</i></a> edge (whichever is in the
1020+
vertical axis) is aligned with the <a
1021+
href="#flex-item-static-position"><i>static position</i></a>.
1022+
10061023
<p> In the <a href="#main-axis"><i>main axis</i></a>,
10071024

10081025
<ol>
@@ -1048,34 +1065,27 @@ <h3 id=abspos-items><span class=secno>4.1. </span> Absolutely-Positioned
10481065
</ul>
10491066
</ol>
10501067

1051-
<p> In the <a href="#cross-axis"><i>cross axis</i></a>, if there is a
1052-
preceding in-flow <a href="#flex-item"><i>flex item</i></a>, the <a
1053-
href="#flex-item-static-position"><i>static position</i></a> is the <a
1054-
href="#cross-start"><i>cross-start</i></a> edge of the <i>flex-line</i>
1055-
that item is in. Otherwise, the <a
1056-
href="#flex-item-static-position"><i>static position</i></a> is the
1057-
<i>cross-start edge</i> of the first <i>flex line</i>.
1068+
<p> In the <a href="#cross-axis"><i>cross axis</i></a>,
10581069

1059-
<p> If both ‘<code class=property>left</code>’ and ‘<code
1060-
class=property>right</code>’ are ‘<a href="#align-self-auto"><code
1061-
class=css>auto</code></a>’, the <a href="#flex-item"><i>flex
1062-
item</i></a> must be positioned so that its <a
1063-
href="#main-start"><i>main-start</i></a> or <a
1064-
href="#cross-start"><i>cross-start</i></a> edge (whichever is in the
1065-
horizontal axis) is aligned with the <a
1066-
href="#flex-item-static-position"><i>static position</i></a>. If both
1067-
<code class=property>top</code>’ and ‘<code
1068-
class=property>bottom</code>’ are ‘<a href="#align-self-auto"><code
1069-
class=css>auto</code></a>’, the <a href="#flex-item"><i>flex
1070-
item</i></a> must be positioned so that its <a
1071-
href="#main-start"><i>main-start</i></a> or <a
1072-
href="#cross-start"><i>cross-start</i></a> edge (whichever is in the
1073-
vertical axis) is aligned with the <a
1074-
href="#flex-item-static-position"><i>static position</i></a>.
1070+
<ol>
1071+
<li> If there is a preceding in-flow <a href="#flex-item"><i>flex
1072+
item</i></a>, the <a href="#flex-item-static-position"><i>static
1073+
position</i></a> is the <a href="#cross-start"><i>cross-start</i></a>
1074+
edge of the <i>flex-line</i> that item is in.
1075+
1076+
<li> Otherwise, the <a href="#flex-item-static-position"><i>static
1077+
position</i></a> is the <i>cross-start edge</i> of the first <i>flex
1078+
line</i>.
1079+
</ol>
10751080

1076-
<p class=note> These rules are intended to more-or-less match what the
1077-
position would be if the abspos was a 0x0 in-flow flex item that
1078-
participated in flex layout.
1081+
<p class=note> The static position is intended to more-or-less match the
1082+
position of an anonymous 0×0 in-flow flex item that participates in flex
1083+
layout, the only difference being that any packing spaces due to ‘<code
1084+
class=css>justify-content: space-around</code>’ or ‘<code
1085+
class=css>justify-content: space-between</code>’ are suppressed around
1086+
the hypothetical item: between it and the next item if there is a real
1087+
item after it, else between it and the previous item (if any) if there
1088+
isn't.
10791089

10801090
<h3 id=item-margins><span class=secno>4.2. </span> Flex Item Margins</h3>
10811091

css3-flexbox/Overview.src.html

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,18 @@ <h3 id='abspos-items'>
669669
then the used value of those properties
670670
are computed from its <dfn id='flex-item-static-position'>static position</dfn>, as follows:
671671

672+
<p>
673+
If both 'left' and 'right' are ''auto'',
674+
the <i>flex item</i> must be positioned so that
675+
its <i>main-start</i> or <i>cross-start</i> edge
676+
(whichever is in the horizontal axis)
677+
is aligned with the <i>static position</i>.
678+
If both 'top' and 'bottom' are ''auto'',
679+
the <i>flex item</i> must be positioned so that
680+
its <i>main-start</i> or <i>cross-start</i> edge
681+
(whichever is in the vertical axis)
682+
is aligned with the <i>static position</i>.
683+
672684
<p>
673685
In the <i>main axis</i>,
674686

@@ -700,28 +712,24 @@ <h3 id='abspos-items'>
700712

701713
<p>
702714
In the <i>cross axis</i>,
703-
if there is a preceding in-flow <i>flex item</i>,
704-
the <i>static position</i> is the <i>cross-start</i> edge of the <i>flex-line</i>
705-
that item is in.
706-
Otherwise, the <i>static position</i> is the <i>cross-start edge</i> of the first <i>flex line</i>.
707-
708-
<p>
709-
If both 'left' and 'right' are ''auto'',
710-
the <i>flex item</i> must be positioned so that
711-
its <i>main-start</i> or <i>cross-start</i> edge
712-
(whichever is in the horizontal axis)
713-
is aligned with the <i>static position</i>.
714-
If both 'top' and 'bottom' are ''auto'',
715-
the <i>flex item</i> must be positioned so that
716-
its <i>main-start</i> or <i>cross-start</i> edge
717-
(whichever is in the vertical axis)
718-
is aligned with the <i>static position</i>.
719715

716+
<ol>
717+
<li>
718+
If there is a preceding in-flow <i>flex item</i>,
719+
the <i>static position</i> is the <i>cross-start</i> edge of the <i>flex-line</i>
720+
that item is in.
721+
<li>
722+
Otherwise, the <i>static position</i> is the <i>cross-start edge</i> of the first <i>flex line</i>.
723+
</ol>
720724

721725
<p class='note'>
722-
These rules are intended to more-or-less match
723-
what the position would be if the abspos was a 0x0 in-flow flex item
724-
that participated in flex layout.
726+
The static position is intended to more-or-less match the position of
727+
an anonymous 0&times;0 in-flow flex item that participates in flex layout,
728+
the only difference being that any packing spaces due to
729+
''justify-content: space-around'' or ''justify-content: space-between''
730+
are suppressed around the hypothetical item:
731+
between it and the next item if there is a real item after it,
732+
else between it and the previous item (if any) if there isn't.
725733

726734
<h3 id='item-margins'>
727735
Flex Item Margins</h3>

0 commit comments

Comments
 (0)