Skip to content

Commit 4530a6a

Browse files
committed
Clarifications to orthogonal flows mappings
1 parent 75ffb1f commit 4530a6a

2 files changed

Lines changed: 61 additions & 49 deletions

File tree

css3-writing-modes/Overview.html

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030

3131
<h1>CSS Writing Modes Module Level 3</h1>
3232

33-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 19 May 2011</h2>
33+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 20 May 2011</h2>
3434

3535
<dl>
3636
<dt>This version:
3737

3838
<dd><a
3939
href="http://dev.w3.org/csswg/css3-writing-modes/">http://dev.w3.org/csswg/css3-writing-modes/</a>
4040
<!--
41-
<dd><a href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110519">http://www.w3.org/TR/2011/ED-css3-writing-modes-20110519/</a>
41+
<dd><a href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110520">http://www.w3.org/TR/2011/ED-css3-writing-modes-20110520/</a>
4242
-->
4343

4444

@@ -2331,49 +2331,55 @@ <h3 id=orthogonal-flows><span class=secno>7.3. </span> Orthogonal Flows</h3>
23312331
href="#vertical-rl"><code class=css>vertical-rl</code></a>&rsquo;).
23322332
</ul>
23332333

2334-
<p>To handle the second case, for the purposes of calculating the layout of
2335-
the box, the physical dimensions corresponding to the extent and measure
2336-
of the containing block are determined using the writing mode of the box
2337-
under consideration, not the writing mode of the element associated with
2338-
the containing block.
2334+
<p>To handle the second case, CSS layout calculations are divided into two
2335+
phases: sizing a box, and positioning the box within its flow. In the
2336+
sizing phase&#8212;calculating the width and height of the box&#8212;the
2337+
dimensions of the box and the containing block are mapped to the measure
2338+
and extent and calculations performed accordingly using the writing mode
2339+
of the element. In the positioning phase&#8212;calculating the positioning
2340+
offsets, margins, borders, and padding&#8212;the dimensions of the box and
2341+
its containing block are mapped to the measure and extent and calculations
2342+
performed according to the writing mode of the containing block.
23392343

23402344
<p>For example, if a vertical block is placed inside a horizontal block,
23412345
then when calculating the physical height (which is the measure) of the
23422346
child block the physical height of the parent block is used to calculate
23432347
the measure of the child's containing block, even though the physical
23442348
height is the extent, not the measure, of the parent block.
23452349

2350+
<p>Since auto auto margins are resolved consistent with the containing
2351+
block's writing mode, a box establishing an orthogonal flow, can, once
2352+
sized, be aligned or centered within its containing block just like other
2353+
block-level elements by using auto margins.
2354+
23462355
<p>It is common in CSS for a containing block to have a defined measure,
23472356
but not a defined extent. This typically happens in CSS2.1 when a
23482357
containing block has an &lsquo;<a href="#auto"><code
23492358
class=css>auto</code></a>&rsquo; height, for example: its width is given
23502359
by the calculations in <a
23512360
href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">10.3.3</a>, but
2352-
its extent depends on its contents. In such cases the <i>available
2353-
measure</i> is defined, but the <i>available extent</i> is infinite.
2354-
2355-
<p>Orthogonal flows allow the opposite to happen: for the <i>available
2356-
extent</i> to be defined, but the <i>available measure</i> to be infinite.
2357-
In such cases a percentage of the containing block measure cannot be
2358-
defined, and thus the initial containing block's measure is used to
2359-
calculate such percentages instead. <span class=issue>Is this definition
2360-
of percentages a good idea?</span>
2361+
its extent depends on its contents. In such cases the <dfn
2362+
id=available-measure>available measure</dfn> is defined as the measure of
2363+
the containing block; but the <dfn id=available-extent>available
2364+
extent</dfn>, which would otherwise be the extent of the containing block,
2365+
is infinite.
2366+
2367+
<p>Orthogonal flows allow the opposite to happen: for the <a
2368+
href="#available-extent"><i>available extent</i></a> to be defined, but
2369+
the <a href="#available-measure"><i>available measure</i></a> to be
2370+
infinite. In such cases a percentage of the containing block measure
2371+
cannot be defined, and thus the initial containing block's measure is used
2372+
instead as a <a href="#fallback-measure"><i>fallback measure</i></a> to
2373+
calculate such percentages.
23612374

23622375
<h4 id=orthogonal-auto><span class=secno>7.3.1. </span> Auto-sizing in
23632376
Orthogonal Flows</h4>
23642377

23652378
<p>If the computed measure of an element establishing an orthogonal flow is
23662379
&lsquo;<a href="#auto"><code class=css>auto</code></a>&rsquo;, then the
2367-
used measure is calculated as the shrink-to-fit (<a
2368-
href="#fit-content"><i>fit-content</i></a>) value using the initial
2369-
containing block's measure as the available size in the shrink-to-fit
2370-
algorithm.
2371-
2372-
<p class=note>As with other shrink-to-fit boxes, the width and height
2373-
calculations occur before auto margin calculations in the inline
2374-
dimension, and therefore a block box establishing an orthogonal flow, once
2375-
sized, can be aligned or centered within its containing block just like
2376-
other block-level elements by using auto margins.
2380+
used measure is calculated as the <a
2381+
href="#fit-content"><i>fit-content</i></a> (shrink-to-fit) size using the
2382+
initial containing block's measure as the available measure.
23772383

23782384
<h4 id=orthogonal-multicol><span class=secno>7.3.2. </span> Multi-column
23792385
Layout in Orthogonal Flows</h4>
@@ -3064,9 +3070,10 @@ <h2 class=no-num id=intrinsic-sizing>Appendix D: Intrinsic Dimensions</h2>
30643070
href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">CSS2.1&sect;10.3.3</a>,
30653071
the <dfn id=fill-available-measure>fill-available measure</dfn> is
30663072
calculated by subtracting out the element's margins, borders, and padding
3067-
from the <i>available measure</i> and flooring the result at zero. If the
3068-
available measure is infinite, then a <dfn id=fallback-measure>fallback
3069-
measure</dfn> is used in place of the <i>available measure</i> in this
3073+
from the <a href="#available-measure"><i>available measure</i></a> and
3074+
flooring the result at zero. If the available measure is infinite, then a
3075+
<dfn id=fallback-measure>fallback measure</dfn> is used in place of the
3076+
<a href="#available-measure"><i>available measure</i></a> in this
30703077
calculation. (In the case of orthogonal flows, this is the measure of the
30713078
initial containing block.) The <dfn
30723079
id=fill-available-extent>fill-available extent</dfn> is similarly

css3-writing-modes/Overview.src.html

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,50 +1698,55 @@ <h3 id="orthogonal-flows">
16981698
example, ''horizontal-tb'' and ''vertical-rl'').</li>
16991699
</ul>
17001700

1701-
<p>To handle the second case, for the purposes of calculating the
1702-
layout of the box, the physical dimensions corresponding to the
1703-
extent and measure of the containing block are determined
1704-
using the writing mode of the box under consideration, not the
1705-
writing mode of the element associated with the containing block.
1706-
1701+
<p>To handle the second case, CSS layout calculations are divided into
1702+
two phases: sizing a box, and positioning the box within its flow.
1703+
In the sizing phase&#8212;calculating the width and height of the
1704+
box&#8212;the dimensions of the box and the containing block
1705+
are mapped to the measure and extent and calculations performed
1706+
accordingly using the writing mode of the element.
1707+
In the positioning phase&#8212;calculating the positioning offsets,
1708+
margins, borders, and padding&#8212;the dimensions of the box and
1709+
its containing block are mapped to the measure and extent and
1710+
calculations performed according to the writing mode of the
1711+
containing block.
1712+
17071713
<p>For example, if a vertical block is placed inside a horizontal
17081714
block, then when calculating the physical height (which is the
17091715
measure) of the child block the physical height of the parent
17101716
block is used to calculate the measure of the child's containing
17111717
block, even though the physical height is the extent, not the
17121718
measure, of the parent block.</p>
17131719

1720+
<p>Since auto auto margins are resolved consistent with the containing
1721+
block's writing mode, a box establishing an orthogonal flow, can,
1722+
once sized, be aligned or centered within its containing block just
1723+
like other block-level elements by using auto margins.
1724+
17141725
<p>It is common in CSS for a containing block to have a defined
17151726
measure, but not a defined extent. This typically happens in
17161727
CSS2.1 when a containing block has an ''auto'' height, for
17171728
example: its width is given by the calculations in
17181729
<a href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">10.3.3</a>,
17191730
but its extent depends on its contents. In such cases the
1720-
<i>available measure</i> is defined, but the <i>available extent</i>
1721-
is infinite.
1731+
<dfn>available measure</dfn> is defined as the measure of the
1732+
containing block; but the <dfn>available extent</dfn>, which
1733+
would otherwise be the extent of the containing block, is
1734+
infinite.
17221735

17231736
<p>Orthogonal flows allow the opposite to happen: for the
17241737
<i>available extent</i> to be defined, but the <i>available
17251738
measure</i> to be infinite. In such cases a percentage of the
17261739
containing block measure cannot be defined, and thus the
1727-
initial containing block's measure is used to calculate such
1728-
percentages instead. <span class="issue">Is this definition
1729-
of percentages a good idea?</span>
1740+
initial containing block's measure is used instead as a
1741+
<i>fallback measure</i> to calculate such percentages.
17301742

17311743
<h4 id="orthogonal-auto">
17321744
Auto-sizing in Orthogonal Flows</h4>
17331745

17341746
<p>If the computed measure of an element establishing an orthogonal
17351747
flow is ''auto'', then the used measure is calculated as the
1736-
shrink-to-fit (<i>fit-content</i>) value using the initial containing
1737-
block's measure as the available size in the shrink-to-fit algorithm.
1738-
1739-
<p class="note">As with other shrink-to-fit boxes, the width and
1740-
height calculations occur before auto margin calculations in the
1741-
inline dimension, and therefore a block box establishing an
1742-
orthogonal flow, once sized, can be aligned or centered within
1743-
its containing block just like other block-level elements by
1744-
using auto margins.
1748+
<i>fit-content</i> (shrink-to-fit) size using the initial containing
1749+
block's measure as the available measure.
17451750

17461751
<h4 id="orthogonal-multicol">
17471752
Multi-column Layout in Orthogonal Flows</h4>

0 commit comments

Comments
 (0)