224224
225225 < h1 id =css-regions-module > CSS Regions Module Level 3</ h1 >
226226
227- < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 29 March 2012</ h2 >
227+ < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 30 March 2012</ h2 >
228228
229229 < dl >
230230 < dt > This version:
231231
232232 < dd > < a
233- href ="http://www.w3.org/TR/2012/ED-css3-regions-20120329 / "> http://www.w3.org/csswg/css3-regions</ a >
233+ href ="http://www.w3.org/TR/2012/ED-css3-regions-20120330 / "> http://www.w3.org/csswg/css3-regions</ a >
234234
235235 < dt > Latest version:
236236
@@ -436,22 +436,41 @@ <h2 class="no-num no-toc" id=table-of-contents>Table of contents</h2>
436436 < ul class =toc >
437437 < li > < a href ="#regions-flow-content-box "> < span class =secno > 7.1.
438438 </ span > The Region Flow Content Box (RFBC)</ a >
439-
440- < li > < a href ="#rfbc-width-computation "> < span class =secno > 7.2. </ span > RFCB
441- ‘< code class =property > width</ code > ’ resolution</ a >
442-
443- < li > < a href ="#rfcb-height-computation "> < span class =secno > 7.3.
444- </ span > RFCB intrinsic ‘< code class =property > height</ code > ’
445- resolution</ a >
446439 < ul class =toc >
447- < li > < a href ="#rfcb=height-resolution-phase-1 "> < span class =secno > 7.3.1.
448- </ span > RFCB intrinsic ‘< code
449- class =property > height</ code > ’ resolution, Phase 1</ a >
440+ < li > < a href ="#rfbc-width-computation "> < span class =secno > 7.1.1.
441+ </ span > RFCB ‘< code class =property > width</ code > ’
442+ resolution</ a >
443+ </ ul >
450444
451- < li > < a href ="#rfcb-height-resolution-phase-2 "> < span class =secno > 7.3.2.
452- </ span > RFCB ‘< code class =property > height</ code > ’
453- resolution Phase 2</ a >
445+ < li > < a href ="#regions-visual-formatting-steps "> < span class =secno > 7.2.
446+ </ span > Regions visual formatting steps</ a >
447+ < ul class =toc >
448+ < li > < a href ="#rfcb-height-computation "> < span class =secno > 7.2.1.
449+ </ span > Step 1: RFCB intrinsic ‘< code
450+ class =property > height</ code > ’ resolution</ a >
451+ < ul class =toc >
452+ < li > < a href ="#rfcb-intrinsic-height-resolution-phase-1 "> < span
453+ class =secno > 7.2.1.1. </ span > RFCB intrinsic ‘< code
454+ class =property > height</ code > ’ resolution, Phase 1</ a >
455+
456+ < li > < a href ="#rfcb-intrinsic-height-resolution-phase-2 "> < span
457+ class =secno > 7.2.1.2. </ span > RFCB intrinsic ‘< code
458+ class =property > height</ code > ’ resolution Phase 2</ a >
459+ </ ul >
460+
461+ < li > < a href ="#regions-boxes-layout "> < span class =secno > 7.2.2.
462+ </ span > Step 2: regions boxes layout</ a >
463+
464+ < li > < a href ="#named-flows-layout "> < span class =secno > 7.2.3. </ span > Step
465+ 3: named flows layout</ a >
454466 </ ul >
467+
468+ < li > < a href ="#regions-visual-formatting-implementation-note "> < span
469+ class =secno > 7.3. </ span > Regions visual formatting: implementation
470+ note</ a >
471+
472+ < li > < a href ="#regions-visual-formatting-examples "> < span class =secno > 7.4.
473+ </ span > Regions visual formatting example</ a >
455474 </ ul >
456475
457476 < li > < a href ="#relation-to-document-events "> < span class =secno > 8.
@@ -2341,14 +2360,15 @@ <h4 id=cssomview-offset-attributes><span class=secno>6.4.2. </span><code
23412360 < h2 id =regions-visual-formatting-details > < span class =secno > 7.
23422361 </ span > Regions visual formatting details</ h2 >
23432362
2344- < p > Regions are can be laid out by CSS as any other boxes. However,
2345- < span > regions</ span > get their content from their generated content and
2346- the fragment of the flow they layout, instead of getting it from their
2347- generated content and descendant content in regular visual formatting.
2363+ < p > Regions are laid out by CSS and take part in the normal box model and
2364+ other layouts offered by CSS modules such as flexible boxes (< a
2365+ href ="#CSS3-FLEXBOX "
2366+ rel =biblioentry > [CSS3-FLEXBOX]<!--{{CSS3-FLEXBOX}}--> </ a > ). However,
2367+ < span > regions</ span > layout a fragment of their named flow instead of
2368+ laying out descendant content as happens with other boxes.
23482369
2349- < p > This section describes the model for rendering < span > region</ span >
2350- content and uses that model to describe how to resolve
2351- < span > regions</ span > sizes.
2370+ < p > This section describes the model for laying out < span > regions</ span > and
2371+ for laying out named flow content into regions.
23522372
23532373 < h3 id =regions-flow-content-box > < span class =secno > 7.1. </ span > The Region
23542374 Flow Content Box (RFBC)</ h3 >
@@ -2357,32 +2377,44 @@ <h3 id=regions-flow-content-box><span class=secno>7.1. </span>The Region
23572377
23582378 < ul >
23592379 < li > The boxes generated by its < code class =css > ::before</ code > and < code
2360- class =css > ::after</ code > pseudo-elements
2380+ class =css > ::after</ code > pseudo-elements, if any.
23612381
2362- < li > The < def > region flow content box (< def > RFBC</ def > ) which contains the
2363- fragment of the flow that the region receives.</ def >
2382+ < li > The anonymous < def > region flow content box (called < def > RFCB</ def > in
2383+ this document) which contains the fragment of the named flow that the
2384+ region receives.</ def >
23642385 </ ul >
23652386
23662387 < div class =figure > < img src ="images/RFCB.svg " width =600px >
23672388 < p class =caption > The Region Flow Content Box (RFCB)</ p >
23682389 </ div >
23692390
2370- < p > Laying out a < span > region</ span > box follows the normal processing rules
2371- as any other container box.
2391+ < p > Laying out a < span > region</ span > container box follows the normal
2392+ processing rules as any other < a
2393+ href ="http://www.w3.org/TR/CSS2/visuren.html#block-boxes "> block container
2394+ box</ a > .
23722395
2373- < p > The < span > RFCB</ span > behaves like a < a
2374- href ="http://www.w3.org/TR/CSS2/visudet.html#blockwidth "> block-level
2375- non-replaced element</ a > in normal flow with regards to its ‘< code
2376- class =property > width</ code > ’.
2396+ < p > With regards to resolving sizes:
23772397
2378- < p > The < span > RFCB</ span > behaves like a < a
2379- href ="http://www.w3.org/TR/CSS2/conform.html#replaced-element "> replaced
2380- element</ a > with regards to its height and computing the
2381- < span > RFCB</ span > ‘< code class =css > s < a href =""> intrinsic height</ a >
2382- require special processing as described in the following sections.</ code >
2398+ < ul >
2399+ < li > The < span > RFCB</ span > behaves like a < a
2400+ href ="http://www.w3.org/TR/CSS2/visudet.html#blockwidth "> block-level
2401+ non-replaced element</ a > with regards to its ‘< code
2402+ class =property > width</ code > ’.
2403+
2404+ < li > The < span > RFCB</ span > behaves like a < a
2405+ href ="http://www.w3.org/TR/CSS2/conform.html#replaced-element "> replaced
2406+ element</ a > with regards to its height. Computing the
2407+ < span > RFCB</ span > ‘< code class =css > s < a href =""> intrinsic height</ a >
2408+ require special processing and is the first step in the process < a
2409+ href ="#regions-visual-formatting-steps "> detailed later</ a > .</ code >
2410+ </ ul >
2411+
2412+ < h4 id =rfbc-width-computation > < span class =secno > 7.1.1. </ span > RFCB
2413+ ’width' resolution</ h4 >
23832414
2384- < h3 id =rfbc-width-computation > < span class =secno > 7.2. </ span > RFCB
2385- ’width' resolution</ h3 >
2415+ < p > At various points in the visual formatting of documents containing
2416+ regions, the ‘< code class =property > width</ code > ’ of RFCBs need
2417+ to be resolved. In all cases, the resolution is done as follows.
23862418
23872419 < p > The ‘< code class =property > width</ code > ’ of an
23882420 < span > RFCB</ span > is based on its < code class =css > min-content</ code > ,
@@ -2391,31 +2423,53 @@ <h3 id=rfbc-width-computation><span class=secno>7.2. </span>RFCB
23912423 < em > shrink-to-fit</ em > ) sizes, as < a href =""> defined</ a > in the CSS
23922424 Writing Modes Module < a href ="#CSS3-WRITING-MODES "
23932425 rel =biblioentry > [CSS3-WRITING-MODES]<!--{{!CSS3-WRITING-MODES}}--> </ a > ).
2394- For an < span > RFCB </ span > , these sizes are computed based on the entire
2395- associated < a href ="#named-flow0 "> named flow</ a > content.
2426+ < strong > These sizes are computed based on the < em > entire</ em > associated
2427+ < a href ="#named-flow0 "> named flow</ a > content</ strong > .
23962428
23972429 < p > This is consistent with the < a
23982430 href ="http://www.w3.org/TR/css3-break/#varying-size-boxes "> box model for
23992431 breaking</ a > (< a href ="#CSS3-BREAK "
24002432 rel =biblioentry > [CSS3-BREAK]<!--{{!CSS3-BREAK}}--> </ a > ).
24012433
2402- < p > This means that all < span > regions</ span > associated with a < a
2434+ < p > As a consequence, all < span > regions</ span > associated with a < a
24032435 href ="#named-flow0 "> named flow</ a > share the same < code
24042436 class =css > min-content</ code > and < code class =css > max-content</ code >
24052437 measures.
24062438
2407- < h3 id =rfcb-height-computation > < span class =secno > 7.3. </ span > RFCB intrinsic
2408- ‘ < code class = property > height </ code > ’ resolution </ h3 >
2439+ < h3 id =regions-visual-formatting-steps > < span class =secno > 7.2.
2440+ </ span > Regions visual formatting steps </ h3 >
24092441
2410- < p > The resolution of an RFCB's ‘< code
2411- class =property > height</ code > ’ requires a two phase process. This
2412- process is a < em > conceptual</ em > description of what the resolution should
2413- yield and implementations should optimize to reduce the number of steps
2414- and phases necessary wherever possible.
2442+ < p > Formatting documents that contain < a href ="#named-flow0 "> named flows</ a >
2443+ laid out in regions is a three step process:
24152444
2416- < h4 id ="rfcb=height-resolution-phase-1 "> < span class =secno > 7.3.1.
2445+ < ul >
2446+ < li > < em > Step 1: RFCB intrinsic height resolution</ em > . In this step, the
2447+ intrinsic heigh of regions flow content boxes is resolved.
2448+
2449+ < li > < em > Step 2: document and regions layout</ em > . In this step, the
2450+ document content is laid out, including regions and their regions flow
2451+ content boxes. However, named flow content is not laid out in regions
2452+ yet.
2453+
2454+ < li > < em > Step 3: named flow layout</ em > . In this step, the content of < a
2455+ href ="#named-flow0 "> named flows</ a > is laid out in their respective
2456+ < span > region chains</ span > .
2457+ </ ul >
2458+
2459+ < div class =figure > < img src ="images/regions-layout-three-steps.svg "
2460+ width =600px >
2461+ < p class =caption > Regions visual formatting steps</ p >
2462+ </ div >
2463+
2464+ < h4 id =rfcb-height-computation > < span class =secno > 7.2.1. </ span > Step 1: RFCB
2465+ intrinsic ‘< code class =property > height</ code > ’ resolution</ h4 >
2466+
2467+ < p > Conceptually, resolving the intrinsic ‘< code
2468+ class =property > height</ code > ’ of an RFCB is a two phase process.
2469+
2470+ < h5 id =rfcb-intrinsic-height-resolution-phase-1 > < span class =secno > 7.2.1.1.
24172471 </ span > RFCB intrinsic ‘< code class =property > height</ code > ’
2418- resolution, Phase 1</ h4 >
2472+ resolution, Phase 1</ h5 >
24192473
24202474 < p > The document is laid out with a < a
24212475 href ="http://www.w3.org/TR/CSS2/cascade.html#used-value "> used</ a > height
@@ -2424,8 +2478,9 @@ <h4 id="rfcb=height-resolution-phase-1"><span class=secno>7.3.1.
24242478 < span > regions</ span > . This phase yields resolved position and sizes for
24252479 all regions and their RFCBs in the document.
24262480
2427- < h4 id =rfcb-height-resolution-phase-2 > < span class =secno > 7.3.2. </ span > RFCB
2428- ‘< code class =property > height</ code > ’ resolution Phase 2</ h4 >
2481+ < h5 id =rfcb-intrinsic-height-resolution-phase-2 > < span class =secno > 7.2.1.2.
2482+ </ span > RFCB intrinsic ‘< code class =property > height</ code > ’
2483+ resolution Phase 2</ h5 >
24292484
24302485 < p > < a href ="#named-flow0 "> Named flows</ a > are laid out in
24312486 < span > regions</ span > . For < span > regions</ span > whose < a
@@ -2446,13 +2501,18 @@ <h4 id=rfcb-height-resolution-phase-2><span class=secno>7.3.2. </span>RFCB
24462501 class =property > overflow</ code > ’ computes to ‘< code
24472502 class =property > visible</ code > ’</ a > section and the < a
24482503 href ="http://www.w3.org/TR/CSS2/visudet.html#block-root-margin "> complicated
2449- cases</ a > section).
2504+ cases</ a > section). During this phase, generated content is laid out
2505+ according to the < a
2506+ href ="file:///Users/vhardy/work/W3C/mercurial/csswg/css3-regions/Overview.html#processing-model "> rules</ a >
2507+ described earlier in this document.
24502508
24512509 < p > This new used ‘< code class =property > height</ code > ’ is the
24522510 intrinsic ‘< code class =property > height</ code > ’ of the
24532511 < span > RFCB</ span > (which behaves like a < a
24542512 href ="http://www.w3.org/TR/CSS2/conform.html#replaced-element "> replaced
2455- element</ a > with regards to sizing).
2513+ element</ a > with regards to its ‘< code
2514+ class =property > height</ code > ’ in the following steps of the
2515+ process).
24562516
24572517 < div class =note > It is important to note that during the Phase 2 of the
24582518 resolution of the RFCB's intrinsic ‘< code
@@ -2464,6 +2524,78 @@ <h4 id=rfcb-height-resolution-phase-2><span class=secno>7.3.2. </span>RFCB
24642524 resolved, the RFCB is treated as block-level replaced element for
24652525 ‘< code class =property > height</ code > ’ computation.</ div >
24662526
2527+ < h4 id =regions-boxes-layout > < span class =secno > 7.2.2. </ span > Step 2: regions
2528+ boxes layout</ h4 >
2529+
2530+ < p > In this step, the document is laid out according to the normal CSS
2531+ layout rules. RFCB boxes, as described before, are treated as < a
2532+ href ="http://www.w3.org/TR/CSS2/visudet.html#blockwidth "> block-level
2533+ non-replaced element</ a > in normal flow with regards to their ‘< code
2534+ class =property > width</ code > ’ and as < a
2535+ href ="http://www.w3.org/TR/CSS2/conform.html#replaced-element "> replaced
2536+ element</ a > with regards to their height. The ‘< code
2537+ class =property > intrinsic</ code > ’ height for regions computed in step
2538+ 1 may be used in this step (it may not be needed, for example if the
2539+ region's computed ‘< code class =property > height</ code > ’ is not
2540+ < code class =css > auto</ code > )
2541+
2542+ < p > At the end of this step, regions are laid out and ready to receive
2543+ content from their associated named flows.
2544+
2545+ < h4 id =named-flows-layout > < span class =secno > 7.2.3. </ span > Step 3: named
2546+ flows layout</ h4 >
2547+
2548+ < p > In this final step, the content of named flows is laid out in the
2549+ < span > regions</ span > ‘< code class =css > RFCBs along with the generated
2550+ content boxes.</ code >
2551+
2552+ < h3 id =regions-visual-formatting-implementation-note > < span class =secno > 7.3.
2553+ </ span > Regions visual formatting: implementation note</ h3 >
2554+
2555+ < p > The process for resolving an RFCB’s ‘< code
2556+ class =property > height</ code > ’ and the three step process used to
2557+ layout documents containing regions and named flows are
2558+ < em > conceptual</ em > descriptions of what the layout should yield and
2559+ implementations should optimize to reduce the number of steps and phases
2560+ necessary wherever possible.
2561+
2562+ < h3 id =regions-visual-formatting-examples > < span class =secno > 7.4.
2563+ </ span > Regions visual formatting example</ h3 >
2564+
2565+ < p > This section is non-normative.
2566+
2567+ < p > This example considers a document where content flows between three
2568+ regions, and region boxes are intermixed with the normal document content.
2569+
2570+ < div class =example >
2571+ < pre >
2572+
2573+ </ pre >
2574+ </ div >
2575+
2576+ < p > The following figure shows the visual result for the example
2577+
2578+ < div class =figure > < img alt ="Regions visual formatting example "
2579+ src ="images/regions-visual-formatting-example.png " width =400px >
2580+ < p class =caption > Region visual formatting example</ p >
2581+ </ div >
2582+
2583+ < div class =figure > < img alt ="Regions visual formatting example "
2584+ src ="images/intrinsic-height-phase-1.png " width =370px >
2585+ < p class =caption > Step 1: Resolving intrinsic height (Phase 1)</ p >
2586+ </ div >
2587+
2588+ < div class =figure > < img alt ="Step 1: Resolving intrinsic height (Phase 2) "
2589+ src ="images/intrinsic-height-phase-2.png " width =370px >
2590+ < p class =caption > Step 1: Resolving intrinsic height (Phase 2)</ p >
2591+ </ div >
2592+
2593+ < div class =figure > < img
2594+ alt ="Step 2: Layout document and regions without named flows "
2595+ src ="images/regions-visual-formatting-step-2.png " width =370px >
2596+ < p class =caption > Step 2: Layout document and regions without named flows</ p >
2597+ </ div >
2598+
24672599 < h2 id =relation-to-document-events > < span class =secno > 8. </ span > Relation to
24682600 document events</ h2 >
24692601
0 commit comments