Skip to content

Commit 4d4c563

Browse files
committed
[css3-writing-modes] Markup tweaks, expand example for orthogonal flows.
1 parent 3941e3c commit 4d4c563

2 files changed

Lines changed: 84 additions & 39 deletions

File tree

css3-writing-modes/Overview.html

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,26 +2699,46 @@ <h3 id=orthogonal-flows><span class=secno>7.3. </span> Orthogonal Flows</h3>
26992699
and ‘<a href="#vertical-rl"><code class=css>vertical-rl</code></a>’).
27002700
</ul>
27012701

2702-
<p>To handle the second case, CSS layout calculations are divided into two
2703-
phases: sizing a box, and positioning the box within its flow. In the
2704-
sizing phase—calculating the width and height of the box—the
2705-
dimensions of the box and the containing block are mapped to the measure
2706-
and extent and calculations performed accordingly using the writing mode
2707-
of the element. In the positioning phase—calculating the positioning
2708-
offsets, margins, borders, and padding—the dimensions of the box and its
2709-
containing block are mapped to the measure and extent and calculations
2710-
performed according to the writing mode of the containing block.
2711-
2712-
<p>For example, if a vertical block is placed inside a horizontal block,
2713-
then when calculating the physical height (which is the measure) of the
2714-
child block the physical height of the parent block is used as the child's
2715-
containing block measure, even though the physical height is the extent,
2716-
not the measure, of the parent block.
2717-
2718-
<p>Since auto margins are resolved consistent with the containing block's
2719-
writing mode, a box establishing an orthogonal flow, can, once sized, be
2720-
aligned or centered within its containing block just like other
2721-
block-level elements by using auto margins.
2702+
<p> When an element has a writing mode that is perpendicular to its
2703+
containing block it is said to be in, or establish, an <dfn
2704+
id=orthogonal-flow>orthogonal flow</dfn>.
2705+
2706+
<p> To handle this case, CSS layout calculations are divided into two
2707+
phases: sizing a box, and positioning the box within its flow.
2708+
2709+
<ul>
2710+
<li> In the sizing phase—calculating the width and height of the
2711+
box—the dimensions of the box and the containing block are mapped to
2712+
the measure and extent and calculations are performed accordingly using
2713+
the writing mode of the <em>element</em>.
2714+
2715+
<li> In the positioning phase—calculating the positioning offsets,
2716+
margins, borders, and padding—the dimensions of the box and its
2717+
containing block are mapped to the measure and extent and calculations
2718+
are performed according to the writing mode of the <em>containing
2719+
block</em>.
2720+
</ul>
2721+
2722+
<p>Since ‘<code class=css>auto</code>’ margins are resolved consistent
2723+
with the containing block's writing mode, a box establishing an orthogonal
2724+
flow can, once sized, be aligned or centered within its containing block
2725+
just like other block-level elements by using auto margins.
2726+
2727+
<div class=example>
2728+
<p> For example, if a vertical block is placed inside a horizontal block,
2729+
then when calculating the physical height (which is the measure) of the
2730+
child block the physical height of the parent block is used as the
2731+
child's containing block measure, even though the physical height is the
2732+
extent, not the measure, of the parent block.
2733+
2734+
<p> On the other hand, because the containing block is in a horizontal
2735+
writing mode, the vertical margins on the child participate in
2736+
margin-collapsing, even though they are in the inline-axis of the child,
2737+
and horizontal auto margins will expand to fill the containing block,
2738+
even though they are in the block-axis of the child.
2739+
2740+
<p class=issue> Add a picture.
2741+
</div>
27222742

27232743
<p>It is common in CSS for a containing block to have a defined measure,
27242744
but not a defined extent. This typically happens in CSS2.1 when a

css3-writing-modes/Overview.src.html

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,37 +1925,62 @@ <h3 id="orthogonal-flows">
19251925

19261926
<p>When an element has a different 'writing-mode' from its
19271927
containing block two cases are possible:
1928+
19281929
<ul>
19291930
<li>The two writing modes are parallel to each other. (For example,
19301931
''vertical-rl'' and ''vertical-lr'').</li>
19311932
<li>The two writing modes are perpendicular to each other. (For
19321933
example, ''horizontal-tb'' and ''vertical-rl'').</li>
19331934
</ul>
19341935

1935-
<p>To handle the second case, CSS layout calculations are divided into
1936+
<p>
1937+
When an element has a writing mode that is perpendicular to its containing block
1938+
it is said to be in, or establish, an <dfn>orthogonal flow</dfn>.
1939+
1940+
<p>
1941+
To handle this case, CSS layout calculations are divided into
19361942
two phases: sizing a box, and positioning the box within its flow.
1937-
In the sizing phase&#8212;calculating the width and height of the
1938-
box&#8212;the dimensions of the box and the containing block
1939-
are mapped to the measure and extent and calculations performed
1940-
accordingly using the writing mode of the element.
1941-
In the positioning phase&#8212;calculating the positioning offsets,
1942-
margins, borders, and padding&#8212;the dimensions of the box and
1943-
its containing block are mapped to the measure and extent and
1944-
calculations performed according to the writing mode of the
1945-
containing block.
19461943

1947-
<p>For example, if a vertical block is placed inside a horizontal
1948-
block, then when calculating the physical height (which is the
1949-
measure) of the child block the physical height of the parent
1950-
block is used as the child's containing block measure, even
1951-
though the physical height is the extent, not the measure, of
1952-
the parent block.</p>
1944+
<ul>
1945+
<li>
1946+
In the sizing phase—calculating the width and height of the
1947+
box—the dimensions of the box and the containing block
1948+
are mapped to the measure and extent and calculations are performed
1949+
accordingly using the writing mode of the <em>element</em>.
1950+
<li>
1951+
In the positioning phase—calculating the positioning offsets,
1952+
margins, borders, and padding—the dimensions of the box and
1953+
its containing block are mapped to the measure and extent and
1954+
calculations are performed according to the writing mode of the
1955+
<em>containing block</em>.
1956+
</ul>
19531957

1954-
<p>Since auto margins are resolved consistent with the containing
1955-
block's writing mode, a box establishing an orthogonal flow, can,
1958+
<p>Since ''auto'' margins are resolved consistent with the containing
1959+
block's writing mode, a box establishing an orthogonal flow can,
19561960
once sized, be aligned or centered within its containing block just
19571961
like other block-level elements by using auto margins.
19581962

1963+
<div class='example'>
1964+
<p>
1965+
For example, if a vertical block is placed inside a horizontal
1966+
block, then when calculating the physical height (which is the
1967+
measure) of the child block the physical height of the parent
1968+
block is used as the child's containing block measure, even
1969+
though the physical height is the extent, not the measure, of
1970+
the parent block.
1971+
1972+
<p>
1973+
On the other hand,
1974+
because the containing block is in a horizontal writing mode,
1975+
the vertical margins on the child participate in margin-collapsing,
1976+
even though they are in the inline-axis of the child,
1977+
and horizontal auto margins will expand to fill the containing block,
1978+
even though they are in the block-axis of the child.
1979+
1980+
<p class='issue'>
1981+
Add a picture.
1982+
</div>
1983+
19591984
<p>It is common in CSS for a containing block to have a defined
19601985
measure, but not a defined extent. This typically happens in
19611986
CSS2.1 when a containing block has an ''auto'' height, for
@@ -2818,7 +2843,7 @@ <h2 id="character-properties" class="no-num">Appendix A.
28182843
<p>Unicode defines properties for characters, but for 'text-orientation',
28192844
it is necessary to determine the properties of a grapheme cluster.
28202845
For the purposes of CSS Writing Modes, the properties of a grapheme
2821-
cluster are given by its base character&#8212;except in two cases:
2846+
cluster are given by its base characterexcept in two cases:
28222847
<ul>
28232848
<li>Grapheme clusters formed with an Enclosing Mark (Me) of the Common
28242849
script are considered to be Other Symbols (So) in the Common script.

0 commit comments

Comments
 (0)