@@ -533,20 +533,54 @@ <h3 id=named-flows-and-regions><span class=secno>1.1. </span>Named flows
533533
534534</ pre >
535535
536- < p > And the following snippet shows an example of elements that will be used
537- as regions.
536+ < p > And the following snippet shows an example using grid cells to define
537+ the region areas:
538538
539539 < pre >
540- <div id="region1"></div>
541- <div id="region2"></div>
542- <div id="region3"></div>
543- <div id="region4"></div>
540+ <style>
541+ #page {
542+ width: 800px;
543+ height: 600px;
544+ grid-template: "aaa.e"
545+ "....e"
546+ "bbb.e"
547+ "....e"
548+ "c.d.e";
549+ grid-rows: 52% 4% 20% 4% 20%;
550+ grid-columns: 30% 5% 30% 5% 30%;
551+ }
552+ #regionA { grid-cell: a; }
553+ #region1 { grid-cell: b; }
554+ #region2 { grid-cell: c; }
555+ #region3 { grid-cell: d; }
556+ #region4 { grid-cell: e; }
557+ </style>
558+
559+ <div id="page">
560+ <div id="region1"></div>
561+ <div id="region2"></div>
562+ <div id="region3"></div>
563+ <div id="region4"></div>
564+ </div>
544565 </ pre >
545566
546- < p > CSS layout facilities can position and size regions as needed. However,
547- there is no existing mechanism to associate the content with the regions
548- so that content flows as intended. Figure 2 shows an example of the
549- intended visual rendering of the content.
567+ < p > Any of the CSS layout facilities can be used to create, position and
568+ size regions as needed.
569+
570+ < div class =note >
571+ < p > Using a grid layout (see < a href ="#CSS3-GRID-LAYOUT "
572+ rel =biblioentry > [CSS3-GRID-LAYOUT]<!--{{CSS3-GRID-LAYOUT}}--> </ a > is just
573+ an example. The example could use a flexible box layout as well, see < a
574+ href ="#CSS3-FLEXBOX "
575+ rel =biblioentry > [CSS3-FLEXBOX]<!--{{CSS3-FLEXBOX}}--> </ a > .</ p >
576+
577+ < p > The CSS regions specification does not define a layout mechanism and is
578+ meant to integrate with existing and future CSS layout facilities.</ p >
579+ </ div >
580+
581+ < p > However, there is no existing mechanism to associate the content with
582+ the regions so that content flows as intended. Figure 2 shows an example
583+ of the intended visual rendering of the content.
550584
551585 < div class =figure > < img
552586 alt ="Sample rendering showing a single thread of text flowing through a chain of regions "
@@ -555,8 +589,18 @@ <h3 id=named-flows-and-regions><span class=secno>1.1. </span>Named flows
555589 </ div >
556590
557591 < p > The CSS regions module is independent of the layout of regions and the
558- mechanism used to create them. However, for simplicity, our example uses
559- elements as regions as shown in the previous code snippet.
592+ mechanism used to create them. For simplicity, our example uses elements
593+ as regions as shown in the previous code snippet.
594+
595+ < div class =note >
596+ < p > While the example uses elements as regions, it is important to note
597+ that this is not required for regions. Regions can be pseudo-elements,
598+ such as ‘< code class =css > ::before</ code > ’ and ‘< code
599+ class =css > ::after</ code > ’. The only requirement for an element or
600+ pseudo-element to become a region is that it needs to be subject to CSS
601+ styling to receive the ‘< a href ="#flow-from "> < code
602+ class =property > flow-from</ code > </ a > ’ property.</ p >
603+ </ div >
560604
561605 < p > The following code example illustrates how the content of the
562606 < code > article</ code > element becomes a flow and how the areas ‘< code
@@ -641,6 +685,16 @@ <h3 id=region-styling><span class=secno>1.2. </span>Regions styling</h3>
641685 padding: 0px;
642686 }
643687< strong > }</ strong >
688+
689+
690+ /*
691+ * Style that would apply to region1's normal content but
692+ * will not apply to its named flow content.
693+ */
694+ #region1 p {
695+ color: red;
696+ }
697+
644698</style>
645699</ pre >
646700 </ div >
@@ -658,6 +712,15 @@ <h3 id=region-styling><span class=secno>1.2. </span>Regions styling</h3>
658712 < p class =caption > Different rendering with a different region styling</ p >
659713 </ div >
660714
715+ < p > Finally, note how the ‘< code class =property > red</ code > ’
716+ color specified for < code > <p></ code > elements under
717+ < code > #region1</ code > does not apply to content that flows into the
718+ region. This specified style does not apply to the named flow content
719+ because the < code > <p></ code > elements in the ‘< code
720+ class =property > article</ code > ’ named flow are not descendants of the
721+ < code > #region1</ code > element and, consequently, the < code > "#region1
722+ p"</ code > selector does not apply to these elements.
723+
661724 < h2 id =css-regions-concepts > < span class =secno > 2. </ span > CSS regions
662725 concepts</ h2 >
663726
@@ -2161,6 +2224,9 @@ <h3 id="changes_from_June_09_2011"><span class=secno>10.1. </span>Changes
21612224
21622225 < li > Modified wording about containing block resolution for absolutely
21632226 positioned elements in a named flow.
2227+
2228+ < li > Modified initial examples as per < a
2229+ href ="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15131 "> Bug 15131</ a >
21642230 </ ul >
21652231
21662232 < h3 id ="changes_from_June_09_2011 "> < span class =secno > 10.2. </ span > Changes
0 commit comments