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
<p>It is common in CSS for a containing block to have a definite
1959
1959
<adata-link-type=dfnhref=#inline-sizetitle=inline-size>inline-size</a>, but not a definite <adata-link-type=dfnhref=#block-sizetitle=block-size>block-size</a>. This typically happens in
1960
-
CSS2.1 when a containing block has an <spanclass=cssdata-link-type=maybetitle=auto>auto</span> height, for
1960
+
CSS2.1 when a containing block has an <spanclass=cssdata-link-for=heightdata-link-type=maybetitle=auto>auto</span> height, for
1961
1961
example: its width is given by the calculations in
If a box establishing an <adata-link-type=dfnhref=#establish-an-orthogonal-flowtitle="orthogonal flow">orthogonal flow</a> is a block container or multi-column element,
1985
-
for the case where the box’s <adata-link-type=dfnhref=#inline-sizetitle=inline-size>inline-size</a> is <spanclass=cssdata-link-type=maybetitle=auto>auto</span>:
1985
+
for the case where the box’s <adata-link-type=dfnhref=#inline-sizetitle=inline-size>inline-size</a> is <spanclass=cssdata-link-for=widthdata-link-type=maybetitle=auto>auto</span>:
1986
1986
1987
1987
<ol>
1988
-
<li>
1989
-
If <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a> and <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> are both <spanclass=cssdata-link-type=maybetitle=auto>auto</span>,
1990
-
calculate the used <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> with the shrink-to-fit formula:
1988
+
<li><strong>Calculate the used <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a>:</strong>
1989
+
<ul>
1990
+
<li>If <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a> and <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> are both <spanclass=cssdata-link-for=column-widthdata-link-type=maybetitle=auto>auto</span>,
<imgalt="Diagram of automatically triggered multi-column preventing T-shaped documents" src=auto-multicol.svgwidth=200>
2011
2012
</div>
2012
-
Note that this automatically triggers multi-column flow on all block containers
2013
-
so that overflowing content, instead of continuing off the side of the containing block,
2013
+
Note that this automatically triggers multi-column flow on all block containers.
2014
+
This is so that overflowing content, instead of continuing off the side of the containing block,
2014
2015
is wrapped into columns in the flow direction of the containing block,
2015
2016
thus avoiding T-shaped documents.
2016
2017
Authors can control the measure of these columns by setting <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a>,
2017
-
or disable this behavior by setting <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css2/visudet.html#propdef-widthtitle=width>width</a>to a non-<spanclass=cssdata-link-type=maybetitle=auto>auto</span> value
2018
-
such as <spanclass=cssdata-link-type=maybetitle=max-content>max-content</span>.
2018
+
or disable this behavior by setting the <adata-link-type=dfnhref=#inline-sizetitle=inline-size>inline-size</a>property
2019
+
to a non-<spanclass=cssdata-link-for=widthdata-link-type=maybetitle=auto>auto</span> value such as <spanclass=cssdata-link-type=maybetitle=max-content>max-content</span>.
2019
2020
<brstyle=clear:both;>
2020
2021
</div>
2021
2022
2022
-
<li>
2023
-
The used column <adata-link-type=dfnhref=#block-sizetitle=block-size>block-size</a> is:
2023
+
<li>If <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a> is not <spanclass=cssdata-link-for=column-countdata-link-type=maybetitle=auto>auto</span> and <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> is <spanclass=cssdata-link-for=column-countdata-link-type=maybetitle=auto>auto</span>,
2024
+
calculate the used <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> with the same formula,
<li>If <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a> and <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> are both non-<spanclass=cssdata-link-for=column-countdata-link-type=maybetitle=auto>auto</span>,
2029
+
the used <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> is the computed <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a>.
2030
+
(This is not recommended as it can cause overflow;
2031
+
instead it is better to set the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> and a max-block-size.)
2032
+
</ul>
2033
+
2034
+
<li><strong>Calculate the used column <adata-link-type=dfnhref=#block-sizetitle=block-size>block-size</a>:</strong>
2035
+
If both <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a> and <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-widthtitle=column-width>column-width</a> are non-<spanclass=cssdata-link-for=column-countdata-link-type=maybetitle=auto>auto</span>,
2036
+
then the used column <adata-link-type=dfnhref=#block-sizetitle=block-size>block-size</a> is the multi-column element’s <adata-link-type=dfnhref=http://dev.w3.org/csswg/css-sizing-3/#max-content-inline-sizetitle="max-content size">max-content size</a>.
2037
+
Otherwise, use
2024
2038
the box’s <adata-link-type=dfnhref=#block-sizetitle=block-size>block-size</a> (if that is <adata-link-type=dfnhref=http://dev.w3.org/csswg/css-sizing-3/#definitetitle=definite>definite</a>),
2025
2039
else the <adata-link-type=dfnhref=http://dev.w3.org/csswg/css-sizing-3/#fill-available-block-sizetitle="fill-available block-size">fill-available block-size</a> of the box (if that is <adata-link-type=dfnhref=http://dev.w3.org/csswg/css-sizing-3/#definitetitle=definite>definite</a>),
2026
2040
else the box’s <adata-link-type=dfnhref=http://dev.w3.org/csswg/css-sizing-3/#max-content-block-sizetitle="max-content block-size">max-content block-size</a>.
so that e.g. a large image will not overflow the box,
2030
2044
but cause the box to overflow the containing block?
2031
2045
2032
-
<li>
2033
-
The used <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a> then follows from filling the resulting columns with the box’s content.
2046
+
<li><strong>Calculate the used <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a>:</strong>
2047
+
If the computed <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a> is <spanclass=cssdata-link-for=column-countdata-link-type=maybetitle=auto>auto</span>, then
2048
+
the used <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-multicol-1/#propdef-column-counttitle=column-count>column-count</a> follows from filling the resulting multi-column layout
0 commit comments