@@ -731,40 +731,41 @@ <h3 id=abspos-flex-items><span class=secno>4.2. </span> Out-of-flow Items</h3>
731731
732732 < h3 id =visibility-collapse > < span class =secno > 4.3. </ span > Collapsed Items</ h3 >
733733
734- < p > Using ‘< code class =css > visibility:collapse</ code > ’ on a flex item
735- produces an effect similar to ‘< code
736- class =css > visibility:collapse</ code > ’ on a table-row or table-column;
737- the collapsed element is removed from rendering entirely (like it was
738- ‘< code class =css > display:none</ code > ’), but it leaves behind a "strut"
739- that helps keep the flex container's layout stable. If a flex container
740- has only one line (whether it's < a
741- href ="#single-line "> < i > single-line</ i > </ a > or < a
742- href ="#multi-line "> < i > multi-line</ i > </ a > ), dynamically collapsing or
743- uncollapsing items is guaranteed to have no effect on the flex container's
744- < a href ="#cross-size "> < i > cross size</ i > </ a > , so it won't cause the rest of
745- your page's layout to "wobble". (A flex container with multiple lines may
746- or may not benefit from this effect, depending on exactly how it is laid
747- out.)
748-
749- < p > Though collapsed flex items aren't rendered, they still generate a box.
750- (Only ‘< code class =css > display:none</ code > ’ actually prevents an
751- element from generating a box.) As such, some effects that depend on an
752- element having a box (like incrementing counters or running animations and
753- transitions) still work on collapsed items, unlike ‘< code
754- class =css > display:none</ code > ’ items.
734+ < p > Specifying ‘< code class =css > visibility:collapse</ code > ’ on a flex
735+ item causes it to become a < dfn id =collapsed-flex-item
736+ title ="collapsed flex item|collapsed "> collapsed flex item</ dfn > , producing
737+ an effect similar to ‘< code class =css > visibility:collapse</ code > ’ on a
738+ table-row or table-column: the collapsed element is removed from rendering
739+ entirely, but leaves behind a "strut" that keeps the flex line's
740+ cross-size stable. Thus, if a flex container has only one flex line,
741+ dynamically collapsing or uncollapsing items is guaranteed to have no
742+ effect on the flex container's < a href ="#cross-size "> < i > cross size</ i > </ a >
743+ and won't cause the rest of the page's layout to "wobble". Flex line
744+ wrapping < em > is</ em > re-done after collapsing, however, so the cross-size
745+ of a flex container with multiple lines might or might not change.
746+
747+ < p > Though collapsed flex items aren't rendered, they do appear in the < a
748+ href ="http://www.w3.org/TR/CSS21/intro.html#formatting-structure "> formatting
749+ struture</ a > . Therefore, unlike on ‘< code
750+ class =css > display:none</ code > ’ items < a href ="#CSS21 "
751+ rel =biblioentry > [CSS21]<!--{{!CSS21}}--> </ a > , effects that depend on an
752+ element appearing in the formatting structure (like incrementing counters
753+ or running animations and transitions) still operate on collapsed items.
754+
755+ < p > To compute the size of the strut, flex layout is first performed with
756+ all items uncollapsed, and then re-run with each collapsed item replaced
757+ by a strut that maintains the original cross-size of the item's original
758+ line. See the < a href ="#layout-algorithm "> Flex Layout Algorithm</ a > for
759+ the normative definition of how ‘< code
760+ class =css > visibility:collapse</ code > ’ interacts with flex layout.
755761
756762 < p class =note > Note that using ‘< code
757763 class =css > visibility:collapse</ code > ’ on any flex items will cause the
758764 flex layout algorithm to repeat partway through, re-running the most
759765 expensive steps. It's recommended that authors continue to use ‘< code
760- class =css > display:none</ code > ’ to hide items if the special effects of
761- ‘< code class =css > visibility:collapse</ code > ’ aren't explicitly
762- required, as that is more efficient for the layout engine.
763-
764- < p > The normative definition of how ‘< code
765- class =css > visibility:collapse</ code > ’ interacts with the flex layout
766- algorithm is defined < a href ="#layout-algorithm "> later in this
767- specification</ a > .
766+ class =css > display:none</ code > ’ to hide items if the items will not be
767+ dynamically collapsed and uncollapsed, as that is more efficient for the
768+ layout engine.
768769
769770 < h3 id =min-size-auto > < span class =secno > 4.4. </ span > Implied Minimum Size of
770771 Flex Items</ h3 >
@@ -3519,6 +3520,12 @@ <h2 class=no-num id=index>Index</h2>
35193520 title ="''center'' "> < strong > 8.4.</ strong > </ a > , < a href ="#flex-pack-center "
35203521 title ="''center'' "> < strong > 8.2.</ strong > </ a >
35213522
3523+ < li > collapsed, < a href ="#collapsed-flex-item "
3524+ title =collapsed > < strong > 4.3.</ strong > </ a >
3525+
3526+ < li > collapsed flex item, < a href ="#collapsed-flex-item "
3527+ title ="collapsed flex item "> < strong > 4.3.</ strong > </ a >
3528+
35223529 < li > ‘< a href ="#flex-flow-column "> < code class =css > column</ code > </ a > ’,
35233530 < a href ="#flex-flow-column " title ="''column'' "> < strong > 5.1.</ strong > </ a >
35243531
0 commit comments