|
30 | 30 |
|
31 | 31 | <h1>CSS Writing Modes Module Level 3</h1> |
32 | 32 |
|
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> |
34 | 34 |
|
35 | 35 | <dl> |
36 | 36 | <dt>This version: |
37 | 37 |
|
38 | 38 | <dd><a |
39 | 39 | href="http://dev.w3.org/csswg/css3-writing-modes/">http://dev.w3.org/csswg/css3-writing-modes/</a> |
40 | 40 | <!-- |
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> |
42 | 42 | --> |
43 | 43 |
|
44 | 44 |
|
@@ -2331,49 +2331,55 @@ <h3 id=orthogonal-flows><span class=secno>7.3. </span> Orthogonal Flows</h3> |
2331 | 2331 | href="#vertical-rl"><code class=css>vertical-rl</code></a>’). |
2332 | 2332 | </ul> |
2333 | 2333 |
|
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—calculating the width and height of the box—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—calculating the positioning |
| 2340 | + offsets, margins, borders, and padding—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. |
2339 | 2343 |
|
2340 | 2344 | <p>For example, if a vertical block is placed inside a horizontal block, |
2341 | 2345 | then when calculating the physical height (which is the measure) of the |
2342 | 2346 | child block the physical height of the parent block is used to calculate |
2343 | 2347 | the measure of the child's containing block, even though the physical |
2344 | 2348 | height is the extent, not the measure, of the parent block. |
2345 | 2349 |
|
| 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 | + |
2346 | 2355 | <p>It is common in CSS for a containing block to have a defined measure, |
2347 | 2356 | but not a defined extent. This typically happens in CSS2.1 when a |
2348 | 2357 | containing block has an ‘<a href="#auto"><code |
2349 | 2358 | class=css>auto</code></a>’ height, for example: its width is given |
2350 | 2359 | by the calculations in <a |
2351 | 2360 | 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. |
2361 | 2374 |
|
2362 | 2375 | <h4 id=orthogonal-auto><span class=secno>7.3.1. </span> Auto-sizing in |
2363 | 2376 | Orthogonal Flows</h4> |
2364 | 2377 |
|
2365 | 2378 | <p>If the computed measure of an element establishing an orthogonal flow is |
2366 | 2379 | ‘<a href="#auto"><code class=css>auto</code></a>’, 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. |
2377 | 2383 |
|
2378 | 2384 | <h4 id=orthogonal-multicol><span class=secno>7.3.2. </span> Multi-column |
2379 | 2385 | Layout in Orthogonal Flows</h4> |
@@ -3064,9 +3070,10 @@ <h2 class=no-num id=intrinsic-sizing>Appendix D: Intrinsic Dimensions</h2> |
3064 | 3070 | href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">CSS2.1§10.3.3</a>, |
3065 | 3071 | the <dfn id=fill-available-measure>fill-available measure</dfn> is |
3066 | 3072 | 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 |
3070 | 3077 | calculation. (In the case of orthogonal flows, this is the measure of the |
3071 | 3078 | initial containing block.) The <dfn |
3072 | 3079 | id=fill-available-extent>fill-available extent</dfn> is similarly |
|
0 commit comments