@@ -568,8 +568,9 @@ <h3 id=overview><span class=secno>1.1. </span> Overview</h3>
568568</section> </ pre >
569569 </ div >
570570 </ div >
571-
572- < div style ="display:table; margin: 1em auto; border-spacing: .5em; ">
571+ < figure >
572+ < div
573+ style ="display:table; margin: 0 auto 1em; border-spacing: .5em; min-width: 672px; ">
573574 < section class =computer-example > < img
574575 alt ="[A white computer with matching keyboard and monitor.] "
575576 src ="images/computer.jpg ">
@@ -597,7 +598,8 @@ <h1 style="font-size: 1.4em;">Printer</h1>
597598 < li > Paper and ink not included.
598599 </ ul >
599600 < button > BUY NOW</ button > </ section > </ div >
600- </ div >
601+ < figcaption > An example rendering of the code above. </ figcaption >
602+ </ figure > </ div >
601603
602604 < head >
603605 < style scoped >
@@ -610,6 +612,7 @@ <h1 style="font-size: 1.4em;">Printer</h1>
610612 background : hsl (60 , 100% , 90% );
611613 border : thick solid hsl (60 , 80% , 50% );
612614 border-radius : 1em ;
615+ text-align : left;
613616 }
614617 .computer-example > img {
615618 margin : 0 auto;
@@ -680,7 +683,7 @@ <h2 id=box-model><span class=secno>2. </span> Flex Layout Box Model and
680683 class =property > flex-flow</ code > </ a > ’ value determines how these terms
681684 map to physical directions (top/right/bottom/left), axes
682685 (vertical/horizontal), and sizes (width/height). < figure > < img alt
683- height =277 src ="images/flex-direction-terms.svg " width =657 > < figcaption >
686+ height =277 src ="images/flex-direction-terms.svg " width =665 > < figcaption >
684687 An illustration of the various directions and sizing terms as applied to a
685688 ‘< a href ="#flex-flow-row "> < code class =css > row</ code > </ a > ’ flex
686689 container. </ figcaption > </ figure >
@@ -721,7 +724,8 @@ <h2 id=box-model><span class=secno>2. </span> Flex Layout Box Model and
721724 < dt class =axis > cross dimension
722725
723726 < dd > The axis perpendicular to the < a href ="#main-axis "> < i > main
724- axis</ i > </ a > is called the < dfn id =cross-axis > cross axis</ dfn > .
727+ axis</ i > </ a > is called the < dfn id =cross-axis > cross axis</ dfn > . It
728+ extends in the < dfn id =cross-dimension > cross dimension</ dfn > .
725729
726730 < dt class =side > cross-start
727731
@@ -736,11 +740,12 @@ <h2 id=box-model><span class=secno>2. </span> Flex Layout Box Model and
736740 < dt class =size > cross size property
737741
738742 < dd > The width or height of a < a href ="#flex-item "> < i > flex item</ i > </ a > ,
739- whichever is in the < i > cross dimension</ i > , is the item's < dfn
740- id =cross-size > cross size</ dfn > . The < dfn id =cross-size-property > cross
741- size property</ dfn > is whichever of ‘< code
742- class =property > width</ code > ’ or ‘< code
743- class =property > height</ code > ’ that is in the < i > cross dimension</ i > .
743+ whichever is in the < a href ="#cross-dimension "> < i > cross
744+ dimension</ i > </ a > , is the item's < dfn id =cross-size > cross size</ dfn > . The
745+ < dfn id =cross-size-property > cross size property</ dfn > is whichever of
746+ ‘< code class =property > width</ code > ’ or ‘< code
747+ class =property > height</ code > ’ that is in the < a
748+ href ="#cross-dimension "> < i > cross dimension</ i > </ a > .
744749 </ dl >
745750
746751 < h2 id =flex-containers > < span class =secno > 3. </ span > Flex Containers: the
@@ -1608,38 +1613,16 @@ <h2 id=flex-lines><span class=secno>6. </span> Flex Lines</h2>
16081613 to overflow.
16091614
16101615 < li > A < dfn id =multi-line > multi-line</ dfn > flex container breaks its < a
1611- href ="#flex-item "> < i > flex items</ i > </ a > across multiple lines to avoid
1612- overflowing, similar to how text is broken onto a new line when it gets
1613- too wide to fit on the existing line. When additional lines are created,
1614- they are stacked in the flex container along the < a
1615- href =" #cross-axis " > < i > cross axis </ i > </ a > according to the ‘< a
1616- href =" #flex-wrap " > < code class =property > flex-wrap</ code > </ a > ’ property.
1617- Every line contains at least one < a href ="#flex-item "> < i > flex
1618- item </ i > </ a > , unless the flex container itself is completely empty.
1616+ href ="#flex-item "> < i > flex items</ i > </ a > across multiple lines, similar to
1617+ how text is broken onto a new line when it gets too wide to fit on the
1618+ existing line. When additional lines are created, they are stacked in the
1619+ flex container along the < a href =" #cross-axis " > < i > cross axis </ i > </ a >
1620+ according to the ‘< a href =" #flex-wrap " > < code
1621+ class =property > flex-wrap</ code > </ a > ’ property. Every line contains at
1622+ least one < a href ="#flex-item "> < i > flex item </ i > </ a > , unless the flex
1623+ container itself is completely empty.
16191624 </ ul >
16201625
1621- < p > Once content is broken into lines, each line is laid out independently;
1622- flexible lengths and the ‘< a href ="#justify-content "> < code
1623- class =property > justify-content</ code > </ a > ’ and ‘< a
1624- href ="#align-self "> < code class =property > align-self</ code > </ a > ’
1625- properties only consider the items on a single line at a time.
1626-
1627- < p > When a flex container has multiple lines, the < a
1628- href ="#cross-size "> < i > cross size</ i > </ a > of each line is the minimum size
1629- necessary to contain the < a href ="#flex-item "> < i > flex items</ i > </ a > on the
1630- line (after aligment due to ‘< a href ="#align-self "> < code
1631- class =property > align-self</ code > </ a > ’), and the lines are aligned within
1632- the flex container with the ‘< a href ="#align-content "> < code
1633- class =property > align-content</ code > </ a > ’ property. When a flex container
1634- (even a < a href ="#multi-line "> < i > multi-line</ i > </ a > one) has only one
1635- line, the < a href ="#cross-size "> < i > cross size</ i > </ a > of the line is the
1636- < a href ="#cross-size "> < i > cross size</ i > </ a > of the flex container, and
1637- ‘< a href ="#align-content "> < code
1638- class =property > align-content</ code > </ a > ’ has no effect. The < a
1639- href ="#main-size "> < i > main size</ i > </ a > of a line is always the same as the
1640- < a href ="#main-size "> < i > main size</ i > </ a > of the flex container's content
1641- box.
1642-
16431626 < div class =example >
16441627 < p > This example shows four buttons that do not fit horizontally.
16451628
@@ -1670,15 +1653,40 @@ <h2 id=flex-lines><span class=secno>6. </span> Flex Lines</h2>
16701653 container will create an additional line to contain the last item.
16711654 < figure > < img src ="images/multiline-no-flex.svg "> < figcaption > An example
16721655 rendering of the multiline flex container. </ figcaption > </ figure >
1656+ </ div >
16731657
1674- < p > After wrapping, if the items are made flexible, they'll fill their
1675- lines. The first line has 60px of remaining space, and all of the items
1676- have the same flexibility, so each of the three items on that line will
1677- receives 20px of extra width, ending up 100px wide. The remaining item is
1678- on a line of its own and will stretch to the entire width of the line, or
1679- 300px. < figure > < img src ="images/multiline-flex.svg "> < figcaption > A
1680- rendering of the same as above, but with the items all given ‘< code
1681- class =css > flex: auto;</ code > ’. </ figcaption > </ figure >
1658+ < p > Once content is broken into lines, each line is laid out independently;
1659+ flexible lengths and the ‘< a href ="#justify-content "> < code
1660+ class =property > justify-content</ code > </ a > ’ and ‘< a
1661+ href ="#align-self "> < code class =property > align-self</ code > </ a > ’
1662+ properties only consider the items on a single line at a time.
1663+
1664+ < p > When a flex container has multiple lines, the < a
1665+ href ="#cross-size "> < i > cross size</ i > </ a > of each line is the minimum size
1666+ necessary to contain the < a href ="#flex-item "> < i > flex items</ i > </ a > on the
1667+ line (after aligment due to ‘< a href ="#align-self "> < code
1668+ class =property > align-self</ code > </ a > ’), and the lines are aligned within
1669+ the flex container with the ‘< a href ="#align-content "> < code
1670+ class =property > align-content</ code > </ a > ’ property. When a flex container
1671+ (even a < a href ="#multi-line "> < i > multi-line</ i > </ a > one) has only one
1672+ line, the < a href ="#cross-size "> < i > cross size</ i > </ a > of the line is the
1673+ < a href ="#cross-size "> < i > cross size</ i > </ a > of the flex container, and
1674+ ‘< a href ="#align-content "> < code
1675+ class =property > align-content</ code > </ a > ’ has no effect. The < a
1676+ href ="#main-size "> < i > main size</ i > </ a > of a line is always the same as the
1677+ < a href ="#main-size "> < i > main size</ i > </ a > of the flex container's content
1678+ box.
1679+
1680+ < div class =example >
1681+ < p > Here's the same example as the previous, except that the flex items
1682+ have all been given ‘< code class =css > flex: auto</ code > ’. The first
1683+ line has 60px of remaining space, and all of the items have the same
1684+ flexibility, so each of the three items on that line will receives 20px
1685+ of extra width, ending up 100px wide. The remaining item is on a line of
1686+ its own and will stretch to the entire width of the line, or 300px.
1687+ < figure > < img src ="images/multiline-flex.svg "> < figcaption > A rendering
1688+ of the same as above, but with the items all given ‘< code
1689+ class =css > flex: auto</ code > ’. </ figcaption > </ figure >
16821690 </ div >
16831691
16841692 < h2 id =flexibility > < span class =secno > 7. </ span > Flexibility</ h2 >
@@ -4040,6 +4048,9 @@ <h2 class=no-num id=index>Index</h2>
40404048 < li > cross axis, < a href ="#cross-axis "
40414049 title ="cross axis "> < strong > 2.</ strong > </ a >
40424050
4051+ < li > cross dimension, < a href ="#cross-dimension "
4052+ title ="cross dimension "> < strong > 2.</ strong > </ a >
4053+
40434054 < li > cross-end, < a href ="#cross-end "
40444055 title =cross-end > < strong > 2.</ strong > </ a >
40454056
0 commit comments