Skip to content

Commit bc2af74

Browse files
committed
Editorial changes
1 parent c834dd7 commit bc2af74

2 files changed

Lines changed: 133 additions & 93 deletions

File tree

css3-regions/Overview.html

Lines changed: 128 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
content="text/html; charset=utf-8" http-equiv=Content-Type>
77

88
<title>CSS Regions Module Level 3</title>
9-
<link href=default.css rel=stylesheet type="text/css">
9+
<link href="../default.css" rel=stylesheet type="text/css">
1010

1111
<style type="text/css">
1212

@@ -224,13 +224,13 @@
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 2 April 2012</h2>
227+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 4 April 2012</h2>
228228

229229
<dl>
230230
<dt>This version:
231231

232232
<dd><a
233-
href="http://www.w3.org/TR/2012/ED-css3-regions-20120402/">http://www.w3.org/csswg/css3-regions</a>
233+
href="http://www.w3.org/TR/2012/ED-css3-regions-20120404/">http://www.w3.org/csswg/css3-regions</a>
234234

235235
<dt>Latest version:
236236

@@ -576,7 +576,7 @@ <h3 id=named-flows-and-regions><span class=secno>1.1. </span>Named flows
576576

577577
<div class=figure> <img
578578
alt="multiple chained regions which should receive content from a flow"
579-
src="images/regions-intro.svg" width=400>
579+
src="images/intro-example-layout.svg" width=400>
580580
<p class=caption>Layout requiring sophisticated content flow</p>
581581
</div>
582582

@@ -591,7 +591,17 @@ <h3 id=named-flows-and-regions><span class=secno>1.1. </span>Named flows
591591
class=property>A</code>&rsquo; and to flow an article's text from region
592592
&lsquo;<code class=css>1</code>&rsquo;, to region &lsquo;<code
593593
class=css>2</code>&rsquo;, &lsquo;<code class=css>3</code>&rsquo; and
594-
&lsquo;<code class=css>4</code>&rsquo;.
594+
&lsquo;<code class=css>4</code>&rsquo;. Note that the second region should
595+
have two columns.
596+
597+
<p>Figure 2 shows an example of the intended visual rendering of the
598+
content.
599+
600+
<div class=figure> <img
601+
alt="Sample rendering showing a single thread of text flowing through a chain of regions"
602+
src="images/regions-intro-rendering.png" width=450>
603+
<p class=caption>Sample rendering for desired layout</p>
604+
</div>
595605

596606
<p>The following code snippet shows the content to flow between the regions
597607
1, 2, 3 and 4.
@@ -601,83 +611,56 @@ <h3 id=named-flows-and-regions><span class=secno>1.1. </span>Named flows
601611
&lt;h1&gt;Introduction&lt;/h1&gt;
602612
&lt;p&gt;This is an example ...&lt;/p&gt;
603613

604-
&lt;h1&gt;More Details&lt;/h1&gt;
614+
&lt;h2&gt;More Details&lt;/h2&gt;
605615
&lt;p&gt;This illustrates ...&lt;/p&gt;
606616
&lt;p&gt;Then, the example ...&lt;/p&gt;
607617
&lt;p&gt;Finally, this ...&lt;/p&gt;
608618
&lt;/div&gt;
609619

610620
</pre>
611621

612-
<p>And the following snippet shows an example using grid cells to define
613-
the region areas:
622+
<p>And the following snippet shows an example using grid cells to define,
623+
size and position the region areas:
614624

615625
<pre>
616626
&lt;style&gt;
617-
#page {
627+
#grid {
618628
width: 800px;
619629
height: 600px;
620-
grid-template: "aaa.e"
621-
"....e"
622-
"bbb.e"
623-
"....e"
624-
"c.d.e";
630+
grid-template: "aaa.d"
631+
"....d"
632+
"bbb.d"
633+
"....d"
634+
"ccc.d";
625635
grid-rows: 52% 4% 20% 4% 20%;
626636
grid-columns: 30% 5% 30% 5% 30%;
627637
}
628638
#regionA { grid-cell: a; }
629639
#region1 { grid-cell: b; }
630640
#region2 { grid-cell: c; }
631641
#region3 { grid-cell: d; }
632-
#region4 { grid-cell: e; }
642+
643+
#region4 {
644+
width: 800px;
645+
}
646+
647+
#region2 {
648+
column-count: 2;
649+
}
633650
&lt;/style&gt;
634651

635-
&lt;div id="page"&gt;
652+
&lt;div id="grid"&gt;
653+
&lt;div id="regionA"&gt;&lt;/div&gt;
636654
&lt;div id="region1"&gt;&lt;/div&gt;
637655
&lt;div id="region2"&gt;&lt;/div&gt;
638656
&lt;div id="region3"&gt;&lt;/div&gt;
639-
&lt;div id="region4"&gt;&lt;/div&gt;
640657
&lt;/div&gt;
658+
&lt;div id="region4"&gt;&lt;/div&gt;
641659
</pre>
642660

643-
<p>Any of the CSS layout facilities can be used to create, position and
644-
size regions as needed.
645-
646-
<div class=note>
647-
<p>Using a grid layout (see <a href="#CSS3-GRID-LAYOUT"
648-
rel=biblioentry>[CSS3-GRID-LAYOUT]<!--{{CSS3-GRID-LAYOUT}}--></a> is just
649-
an example. The example could use a flexible box layout as well, see <a
650-
href="#CSS3-FLEXBOX"
651-
rel=biblioentry>[CSS3-FLEXBOX]<!--{{CSS3-FLEXBOX}}--></a>.</p>
652-
653-
<p>The CSS regions specification does not define a layout mechanism and is
654-
meant to integrate with existing and future CSS layout facilities.</p>
655-
</div>
656-
657661
<p>However, there is no existing mechanism to associate the content with
658-
the regions so that content flows as intended. Figure 2 shows an example
659-
of the intended visual rendering of the content.
660-
661-
<div class=figure> <img
662-
alt="Sample rendering showing a single thread of text flowing through a chain of regions"
663-
src="images/regions-intro-rendering.png" width=450>
664-
<p class=caption>Sample rendering for desired layout</p>
665-
</div>
666-
667-
<p>The CSS regions module is independent of the layout of regions and the
668-
mechanism used to create them. For simplicity, our example uses elements
669-
as regions as shown in the previous code snippet.
670-
671-
<div class=note>
672-
<p>While the example uses elements as regions (since [CSS3-GRID-LAYOUT]
673-
requires elements to create grid items) it is important to note that this
674-
is not required for regions. Regions can be pseudo-elements, such as
675-
&lsquo;<code class=css>::before</code>&rsquo; and &lsquo;<code
676-
class=css>::after</code>&rsquo;. The only requirement for an element or
677-
pseudo-element to become a region is that it needs to be subject to CSS
678-
styling to receive the &lsquo;<a href="#flow-from"><code
679-
class=property>flow-from</code></a>&rsquo; property.</p>
680-
</div>
662+
the regions so that content flows as intended. The CSS regions module
663+
properties provide that mechanism.
681664

682665
<p>The following code example illustrates how the content of the
683666
<code>article</code> element becomes a flow and how the areas &lsquo;<code
@@ -714,18 +697,58 @@ <h3 id=named-flows-and-regions><span class=secno>1.1. </span>Named flows
714697
the flow is &lsquo;<code class=css>poured</code>&rsquo; into the desired
715698
regions.
716699

700+
<p class=note>Note that a multi-column element is used for region 2, which
701+
is a bit gratuitous here (because grid cells could be used). The reason to
702+
use a multi-column element here is to illustrate that regions can be
703+
multi-column.
704+
705+
<div class=note>
706+
<p><strong>CSS regions are independent from layout</strong></p>
707+
708+
<p>Any of the CSS layout facilities can be used to create, position and
709+
size regions as needed.</p>
710+
711+
<p>Using a grid layout (see <a href="#CSS3-GRID-LAYOUT"
712+
rel=biblioentry>[CSS3-GRID-LAYOUT]<!--{{CSS3-GRID-LAYOUT}}--></a> is just
713+
an example. The example could use a flexible box layout as well, see <a
714+
href="#CSS3-FLEXBOX"
715+
rel=biblioentry>[CSS3-FLEXBOX]<!--{{CSS3-FLEXBOX}}--></a>.</p>
716+
717+
<p>The CSS regions specification does not define a layout mechanism and is
718+
meant to integrate with existing and future CSS layout facilities.</p>
719+
720+
<p><strong>Regions do not have to be elements</strong></p>
721+
722+
<p>The CSS regions module is independent of the layout of regions and the
723+
mechanism used to create them. For simplicity, our example uses elements
724+
as regions as shown in the previous code snippet.</p>
725+
726+
<p>While the example uses elements as regions (since <a
727+
href="#CSS3-GRID-LAYOUT"
728+
rel=biblioentry>[CSS3-GRID-LAYOUT]<!--{{CSS3-GRID-LAYOUT}}--></a>
729+
requires elements to create grid items) it is important to note that this
730+
is not required for regions. Regions can be pseudo-elements, such as
731+
&lsquo;<code class=css>::before</code>&rsquo; and &lsquo;<code
732+
class=css>::after</code>&rsquo;. The only requirement for an element or
733+
pseudo-element to become a region is that it needs to be subject to CSS
734+
styling to receive the &lsquo;<a href="#flow-from"><code
735+
class=property>flow-from</code></a>&rsquo; property. The CSS page
736+
template module (see [[CSS-PAGE-TEMPLATES]]) proposes another mechanism
737+
to create regions with the <code class=css>@slot</code> syntax.</p>
738+
</div>
739+
717740
<h3 id=region-styling><span class=secno>1.2. </span>Regions styling</h3>
718741

719742
<p>Region styling allows content to be styled depending on the region it
720-
flows into. It is a form of context-based styling, similar to Media
721-
Queries <a href="#MEDIAQ" rel=biblioentry>[MEDIAQ]<!--{{MEDIAQ}}--></a>
722-
which enable or disable selectors depending on the rendering context. With
723-
region styling, additional selectors may apply depending on the region
724-
into which content flows.
743+
flows into. It is a more sophisticated form of pseudo-element styling such
744+
as <a href="http://www.w3.org/TR/css3-selectors/#first-line"><code
745+
class=css>::first-line</code> </a> which apply a particular style to a
746+
fragment of content. With region styling, additional selectors may apply
747+
depending on the region into which content flows.
725748

726-
<p>In our example, the designer wants to make text flowing into region 1
727-
larger, bold and dark blue. In addition, <code
728-
class=html>&lt;h1&gt;</code> headers should be crimson.
749+
<p>In our example, the designer wants to make text flowing into region dark
750+
blue. In addition, <code class=html>&lt;h1&gt;</code> headers should be
751+
crimson.
729752

730753
<p>This design can be expressed with region styling as shown below.
731754

@@ -741,26 +764,23 @@ <h3 id=region-styling><span class=secno>1.2. </span>Regions styling</h3>
741764
}
742765

743766
#article h1 {
767+
color: crimson;
768+
display: run-in;
769+
}
770+
771+
#article h2 {
744772
border-left: 1px solid #777;
745773
padding-left: 2ex;
746-
display: run-in;
747774
}
748775

749776
/*
750777
* Additional styling to apply to content when it falls into
751778
* region1
752779
*/
753780
<strong>@region #region1 {</strong>
754-
#article {
755-
font-weight: bold;
781+
p {
756782
color: #0C3D5F;
757-
font-size: larger;
758-
}
759-
760-
#article h1 {
761-
color: crimson;
762-
border: none;
763-
padding: 0px;
783+
font-weight: bold;
764784
}
765785
<strong>}</strong>
766786

@@ -779,10 +799,10 @@ <h3 id=region-styling><span class=secno>1.2. </span>Regions styling</h3>
779799

780800
<p>The &lsquo;<code class=css>@region</code>&rsquo; rule for region 1
781801
limits its selectors to content flowing into region 1. The following
782-
figure shows how the rendering changes if we do not increase the font size
783-
nor make it bold for content flowing into region 1. As more content can be
784-
fitted, more content is subject to the contextual selectors, resulting in
785-
more dark blue text into region 1.
802+
figure shows how the rendering changes if we do not apply styling specific
803+
to region 1. Note how more text fits into region 1 now that the
804+
&lsquo;<code class=property>font-weight</code>&rsquo; is normal instead of
805+
bold.
786806

787807
<div class=figure> <img
788808
alt="Illustrate how changing region styling affects the flow of content."
@@ -835,7 +855,9 @@ <h3 id=regions><span class=secno>2.1. </span>Regions</h3>
835855
class=property>flow-from</code></a>&rsquo; property). The <a
836856
href="http://dev.w3.org/csswg/css3-multicol/#column-box">column boxes</a>
837857
of multi-column elements which have an associated <a
838-
href="#named-flow0"><em><span>named flow</span></em></a> are also regions.
858+
href="#named-flow0"><em><span>named flow</span></em></a> are also regions
859+
(see the <a href="#multi-column-regions">section on multi-column
860+
regions</a>).
839861

840862
<h3 id=named-flow><span class=secno>2.2. </span>Named flow</h3>
841863

@@ -884,6 +906,10 @@ <h3 id=regions-flow-breaking-rules><span class=secno>2.3. </span>Regions
884906
class=property>region-overflow</code></a>&rsquo; property on the last
885907
<span>region</span> in the chain.
886908

909+
<p>The CSS regions module follows the fragmentation rules defined in the
910+
CSS Fragmentation Module Level 3 (see <a href="#CSS3-BREAK"
911+
rel=biblioentry>[CSS3-BREAK]<!--{{!CSS3-BREAK}}--></a>).
912+
887913
<h2 id=properties-and-rules><span class=secno>3. </span>Properties and
888914
rules</h2>
889915

@@ -1835,8 +1861,8 @@ <h2 id=multi-column-regions><span class=secno>4. </span>Multi-column
18351861

18361862
<p>The fragment of content that flows into column boxes that are regions is
18371863
laid out according to the multi-column specification. In particular, when
1838-
<a href="#intrinsic-height-of-regions">computing the intrinsic height</a>
1839-
of a multi-column element that is associated with a <a
1864+
<a href="#flow-fragment-height-resolution">computing the flow fragment
1865+
height</a> of a multi-column element that is associated with a <a
18401866
href="#named-flow0"><em><span>named flow</span></em></a>, the &lsquo;<code
18411867
class=property>column-fill</code>&rsquo; property is honored to balance
18421868
the fragment of content that would flow across the column-boxes.
@@ -1890,10 +1916,12 @@ <h2 id=multi-column-regions><span class=secno>4. </span>Multi-column
18901916
&lt;div id="remainder"&gt;&lt;/div&gt;</pre>
18911917
</div>
18921918

1893-
<p class=note>Overflow of column boxes that are regions is handled
1894-
according to the same rules as other regions. If the content does not fit
1895-
in the region, then the rest of the content flow into regions that follow
1896-
in the region chain.
1919+
<p>Overflow of column boxes that are regions is handled according to the
1920+
same rules as other regions. If the content does not fit in the region,
1921+
then the rest of the content flow into regions that follow in the region
1922+
chain. If a multi-column region is the last in a <span>region chain, then
1923+
it must generate boxes if its flow fragment overflows as it would with
1924+
normal content.</span>
18971925

18981926
<h3 id=regions><span class=secno>4.1. </span></h3>
18991927

@@ -2421,7 +2449,7 @@ <h2 id=regions-visual-formatting-details><span class=secno>7.
24212449
</span>Regions visual formatting details</h2>
24222450

24232451
<p>Regions are laid out by CSS and take part in the normal box model and
2424-
other layouts offered by CSS modules such as flexible boxes (<a
2452+
other layout models offered by CSS modules such as flexible boxes (<a
24252453
href="#CSS3-FLEXBOX"
24262454
rel=biblioentry>[CSS3-FLEXBOX]<!--{{CSS3-FLEXBOX}}--></a>). However,
24272455
<span>regions</span> layout a fragment of their <a
@@ -2495,12 +2523,12 @@ <h3 id=regions-visual-formatting-steps><span class=secno>7.2.
24952523
</span>Regions visual formatting steps</h3>
24962524

24972525
<p>Formatting documents that contain <a href="#named-flow0">named flows</a>
2498-
laid out in regions is a three step process:
2526+
laid out in regions is a three-step process:
24992527

25002528
<ul>
25012529
<li><em>Step 1: RFCB <def>flow fragment height</def> resolution</em>. In
2502-
this step, the height of fragments fitting in regions flow content boxes
2503-
is resolved.
2530+
this step, the heights of fragments fitting in the regions' RFCBs are
2531+
resolved.
25042532

25052533
<li><em>Step 2: document and regions layout</em>. In this step, the
25062534
document content and regions are laid out. However, <a
@@ -2605,7 +2633,7 @@ <h3 id=regions-visual-formatting-implementation-note><span class=secno>7.3.
26052633
</span>Regions visual formatting: implementation note</h3>
26062634

26072635
<p>The process for resolving an RFCB's &lsquo;<code
2608-
class=property>height</code>&rsquo; and the three step process used to
2636+
class=property>height</code>&rsquo; and the three-step process used to
26092637
layout documents containing regions and <a href="#named-flow0">named
26102638
flows</a> are <em>conceptual</em> descriptions of what the layout should
26112639
yield and implementations should optimize to reduce the number of steps
@@ -2841,6 +2869,16 @@ <h2 id=relation-to-other-specifications><span class=secno>9.
28412869
related to the following specifications:
28422870

28432871
<ol>
2872+
<li>CSS Fragmentation Module Level 3 <a href="#CSS3-BREAK"
2873+
rel=biblioentry>[CSS3-BREAK]<!--{{CSS3-BREAK}}--></a>. This module
2874+
defines the rules for fragmenting content over multiple containers and
2875+
applies to CSS regions in addition to applying to multi-column and paged
2876+
media.
2877+
2878+
<li>CSS Pagination Templates Module Level 3 [[CSS-PAGE-TEMPLATE]]. This
2879+
module defines a syntax to define layout templates which can be used when
2880+
paginating content. The page templates use regions.
2881+
28442882
<li>CSS Exclusions Module <a href="#CSS3-EXCLUSIONS"
28452883
rel=biblioentry>[CSS3-EXCLUSIONS]<!--{{CSS3-EXCLUSIONS}}--></a>. This
28462884
module defines a generic way to define arbitrarily shaped exclusions into
@@ -3000,6 +3038,8 @@ <h3 id="changes_from_June_09_2011"><span class=secno>12.1. </span>Changes
30003038
<li>Added &lsquo;<code class=css>Regions visual formatting
30013039
details</code>&rsquo; section to better describe the model for resolving
30023040
auto sizing on regions.
3041+
3042+
<li>Reworked the initial specification example.
30033043
</ul>
30043044

30053045
<h3 id="changes_from_June_09_2011"><span class=secno>12.2. </span>Changes

0 commit comments

Comments
 (0)