Skip to content

Commit 7aff472

Browse files
committed
[css-regions] Change Appendix A to use custom element layout
1 parent 922525b commit 7aff472

2 files changed

Lines changed: 92 additions & 56 deletions

File tree

css3-regions/Overview.html

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
rel=dcterms.rights>
1313
<meta content="CSS Regions Module Level 3" name=dcterms.title>
1414
<meta content=text name=dcterms.type>
15-
<meta content=2012-11-16 name=dcterms.issued>
15+
<meta content=2012-11-27 name=dcterms.issued>
1616
<meta content="Vincent Hardy" name=dcterms.creator>
1717
<meta content="Alex Mogilevsky" name=dcterms.creator>
1818
<meta content="Alan Stearns" name=dcterms.creator>
1919
<meta content=W3C name=dcterms.publisher>
20-
<meta content="http://www.w3.org/TR/2012/ED-css3-regions-20121116/"
20+
<meta content="http://www.w3.org/TR/2012/ED-css3-regions-20121127/"
2121
name=dcterms.identifier>
2222
<link href="../shared/style/default.css" rel=stylesheet type="text/css">
2323
<script defer=defer
@@ -50,14 +50,14 @@
5050

5151
<h1 id=css-regions-module>CSS Regions Module Level 3</h1>
5252

53-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 16 November
53+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 27 November
5454
2012</h2>
5555

5656
<dl>
5757
<dt>This version:
5858

5959
<dd><a
60-
href="http://www.w3.org/TR/2012/ED-css3-regions-20121116/">http://www.w3.org/csswg/css3-regions</a>
60+
href="http://www.w3.org/TR/2012/ED-css3-regions-20121127/">http://www.w3.org/csswg/css3-regions</a>
6161

6262
<dt>Latest version:
6363

@@ -3225,12 +3225,19 @@ <h2 class=no-num id=intro-example-code>Appendix A. Example Code for
32253225
Introduction</h2>
32263226

32273227
<p>The following is one possible way to code the example from the <a
3228-
href="#introduction">introduction</a>. This code uses grid cells to
3229-
define, size and position the region areas but table layout, absolute
3230-
positioning, or any other CSS layout facility could be used.
3228+
href="#introduction">introduction</a>. This code uses grid cells in a
3229+
custom element to define, size and position the region areas but table
3230+
layout, absolute positioning, or any other CSS layout facility could be
3231+
used.
32313232

32323233
<div class=example>
32333234
<pre>
3235+
3236+
&lt;head&gt;
3237+
&lt;title&gt;Regions Intro Example&lt;/title&gt;
3238+
&lt;link rel="components" href="x-fancy-layout.html"&gt;
3239+
&lt;/head&gt;
3240+
32343241
&lt;style&gt;
32353242
#grid {
32363243
width: 80vw;
@@ -3272,45 +3279,57 @@ <h2 class=no-num id=intro-example-code>Appendix A. Example Code for
32723279
#region1, #region2, #region3, #region4 {
32733280
<strong>flow-from: article_flow;</strong>
32743281
}
3275-
32763282
&lt;/style&gt;
32773283

32783284
<span
32793285
class=highlight>&lt;!--
3280-
The following code element is the content to flow
3281-
through the region chain.
3286+
The body element is extended with the
3287+
layout template from the link above.
32823288
--&gt;</span>
3289+
&lt;body is="x-fancy-layout"&gt;
32833290

3284-
&lt;article&gt;
3285-
&lt;h1&gt;Introduction&lt;/h1&gt;
3286-
&lt;p&gt;This is an example ...&lt;/p&gt;
3287-
3288-
&lt;h2&gt;More Details&lt;/h2&gt;
3289-
&lt;p&gt;This illustrates ...&lt;/p&gt;
3290-
&lt;p&gt;Then, the example ...&lt;/p&gt;
3291-
&lt;p&gt;Finally, this ...&lt;/p&gt;
3292-
&lt;/article&gt;
3291+
<span
3292+
class=highlight>&lt;!--
3293+
The article element is the content to flow
3294+
through the region chain. In the content
3295+
markup, it's followed by the image the
3296+
region chain will flow around.
3297+
--&gt;</span>
3298+
&lt;article&gt;
3299+
&lt;h1&gt;Introduction&lt;/h1&gt;
3300+
&lt;p&gt;This is an example ...&lt;/p&gt;
3301+
3302+
&lt;h2&gt;More Details&lt;/h2&gt;
3303+
&lt;p&gt;This illustrates ...&lt;/p&gt;
3304+
&lt;p&gt;Then, the example ...&lt;/p&gt;
3305+
&lt;p&gt;Finally, this ...&lt;/p&gt;
3306+
&lt;/article&gt;
3307+
&lt;div id="boxA"&gt;&lt;/div&gt;
3308+
&lt;/body&gt;
32933309

32943310
<span
32953311
class=highlight>&lt;!--
3296-
For this example, we layout the regions with a grid.
3297-
Regions could be pseudo-elements and could be laid out
3298-
with another layout module (e.g., flexible boxes)
3312+
In a separate file, we lay out the regions with a grid
3313+
inside a custom element template from Web Components.
32993314
--&gt;</span>
3300-
&lt;div id="grid"&gt;
3301-
&lt;div id="region1"&gt;&lt;/div&gt;
3302-
&lt;div id="region2"&gt;&lt;/div&gt;
3303-
&lt;div id="boxA"&gt;&lt;/div&gt;
3304-
&lt;div id="region3"&gt;&lt;/div&gt;
3305-
&lt;/div&gt;
3306-
&lt;div id="region4"&gt;&lt;/div&gt;
3315+
&lt;element name="x-fancy-layout" extends="body"&gt;
3316+
&lt;template&gt;
3317+
&lt;div id="grid"&gt;
3318+
&lt;div id="region1"&gt;&lt;/div&gt;
3319+
&lt;div id="region2"&gt;&lt;/div&gt;
3320+
&lt;content&gt;&lt;/content&gt;
3321+
&lt;div id="region3"&gt;&lt;/div&gt;
3322+
&lt;/div&gt;
3323+
&lt;div id="region4"&gt;&lt;/div&gt;
3324+
&lt;/template&gt;
3325+
&lt;/element&gt;
33073326
</pre>
33083327
</div>
33093328

33103329
<div class=note><span class=note-prefix>Note </span>
3311-
<p> Note that a multi-column element is used for #region2, which is a bit
3312-
gratuitous here (because grid cells could be used). The reason to use a
3313-
multi-column element is to illustrate that regions can be multi-column.
3330+
<p> A multi-column element is used for #region2, which is a bit gratuitous
3331+
here (because grid cells could be used). The reason to use a multi-column
3332+
element is to illustrate that regions can be multi-column.
33143333
</div>
33153334

33163335
<h2 class=no-num id=references>References</h2>

css3-regions/Overview.src.html

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,12 +2691,18 @@ <h2 id="intro-example-code" class="no-num">Appendix A. Example Code for Introduc
26912691
<p>The following is one possible way
26922692
to code the example from
26932693
the <a href="#introduction">introduction</a>.
2694-
This code uses grid cells
2694+
This code uses grid cells in a custom element
26952695
to define, size and position the region areas
26962696
but table layout, absolute positioning,
26972697
or any other CSS layout facility could be used.</p>
26982698

26992699
<div class="example"><pre>
2700+
2701+
&lt;head&gt;
2702+
&lt;title&gt;Regions Intro Example&lt;/title&gt;
2703+
&lt;link rel="components" href="x-fancy-layout.html"&gt;
2704+
&lt;/head&gt;
2705+
27002706
&lt;style&gt;
27012707
#grid {
27022708
width: 80vw;
@@ -2736,43 +2742,54 @@ <h2 id="intro-example-code" class="no-num">Appendix A. Example Code for Introduc
27362742
#region1, #region2, #region3, #region4 {
27372743
<strong>flow-from: article_flow;</strong>
27382744
}
2739-
27402745
&lt;/style&gt;
27412746

27422747
<span class="highlight">&lt;!--
2743-
The following code element is the content to flow
2744-
through the region chain.
2748+
The body element is extended with the
2749+
layout template from the link above.
27452750
--&gt;</span>
2751+
&lt;body is="x-fancy-layout"&gt;
27462752

2747-
&lt;article&gt;
2748-
&lt;h1&gt;Introduction&lt;/h1&gt;
2749-
&lt;p&gt;This is an example ...&lt;/p&gt;
2750-
2751-
&lt;h2&gt;More Details&lt;/h2&gt;
2752-
&lt;p&gt;This illustrates ...&lt;/p&gt;
2753-
&lt;p&gt;Then, the example ...&lt;/p&gt;
2754-
&lt;p&gt;Finally, this ...&lt;/p&gt;
2755-
&lt;/article&gt;
2753+
<span class="highlight">&lt;!--
2754+
The article element is the content to flow
2755+
through the region chain. In the content
2756+
markup, it's followed by the image the
2757+
region chain will flow around.
2758+
--&gt;</span>
2759+
&lt;article&gt;
2760+
&lt;h1&gt;Introduction&lt;/h1&gt;
2761+
&lt;p&gt;This is an example ...&lt;/p&gt;
2762+
2763+
&lt;h2&gt;More Details&lt;/h2&gt;
2764+
&lt;p&gt;This illustrates ...&lt;/p&gt;
2765+
&lt;p&gt;Then, the example ...&lt;/p&gt;
2766+
&lt;p&gt;Finally, this ...&lt;/p&gt;
2767+
&lt;/article&gt;
2768+
&lt;div id="boxA"&gt;&lt;/div&gt;
2769+
&lt;/body&gt;
27562770

27572771
<span class="highlight">&lt;!--
2758-
For this example, we layout the regions with a grid.
2759-
Regions could be pseudo-elements and could be laid out
2760-
with another layout module (e.g., flexible boxes)
2772+
In a separate file, we lay out the regions with a grid
2773+
inside a custom element template from Web Components.
27612774
--&gt;</span>
2762-
&lt;div id="grid"&gt;
2763-
&lt;div id="region1"&gt;&lt;/div&gt;
2764-
&lt;div id="region2"&gt;&lt;/div&gt;
2765-
&lt;div id="boxA"&gt;&lt;/div&gt;
2766-
&lt;div id="region3"&gt;&lt;/div&gt;
2767-
&lt;/div&gt;
2768-
&lt;div id="region4"&gt;&lt;/div&gt;
2775+
&lt;element name="x-fancy-layout" extends="body"&gt;
2776+
&lt;template&gt;
2777+
&lt;div id="grid"&gt;
2778+
&lt;div id="region1"&gt;&lt;/div&gt;
2779+
&lt;div id="region2"&gt;&lt;/div&gt;
2780+
&lt;content&gt;&lt;/content&gt;
2781+
&lt;div id="region3"&gt;&lt;/div&gt;
2782+
&lt;/div&gt;
2783+
&lt;div id="region4"&gt;&lt;/div&gt;
2784+
&lt;/template&gt;
2785+
&lt;/element&gt;
27692786
</pre></div>
27702787

27712788

27722789

27732790
<div class="note"><span class="note-prefix">Note </span>
27742791
<p>
2775-
Note that a multi-column element is used for #region2,
2792+
A multi-column element is used for #region2,
27762793
which is a bit gratuitous here
27772794
(because grid cells could be used).
27782795
The reason to use a multi-column element

0 commit comments

Comments
 (0)