Skip to content

Commit 4964b94

Browse files
committed
[css-regions] fix example for issue 19965
1 parent f219b8a commit 4964b94

3 files changed

Lines changed: 100 additions & 99 deletions

File tree

css3-regions/Overview.html

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,8 +1356,7 @@ <h3 id=the-region-fragment-property><span class=secno>3.4. </span>The
13561356
<tr>
13571357
<td><code class=css>flow-into: "article"</code>
13581358

1359-
<td><code class=html>region-1</code> and <code
1360-
class=html>region-2</code>
1359+
<td><code>region-1</code> and <code class=html>region-2</code>
13611360

13621361
<td><code class=css>region-fragment: auto</code><br>
13631362
<code class=css>overflow:visible</code>
@@ -1503,50 +1502,48 @@ <h3 id=the-at-region-style-rule><span class=secno>3.5. </span>The @region
15031502
class=property>width</code>’ property</a>
15041503
</ol>
15051504

1506-
<div class=issue-marker data-bug_id=19965 data-bug_status=NEW> <a
1507-
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=19965">Issue-19965</a>
1508-
1509-
<div class=issue-details>
1510-
<p class=short-desc>Rework region styling example to use color changes
1511-
</div>
1512-
</div>
1513-
15141505
<div class=example id=region-style-example>
15151506
<p>In the following example, the <a href="#named-flow0">named flow</a>
15161507
<code class=property>article-flow</code>’ flows through ‘<code
15171508
class=css>region-1</code>’ and ‘<code class=css>region-2</code>’.
15181509

15191510
<pre>
1520-
&lt;style&gt;
1521-
#div-1 {
1511+
&lt;body is="x-region-style-example"&gt;
1512+
&lt;div id="div-1"&gt;
1513+
&lt;p id="p-1"&gt;...&lt;/p&gt;
1514+
&lt;p id="p-2"&gt;...&lt;/p&gt;
1515+
&lt;/div&gt;
1516+
&lt;/body&gt;
1517+
1518+
&lt;element name="x-region-style-example" extends="body"&gt;
1519+
&lt;template&gt;
1520+
&lt;style&gt;
1521+
#div-1 {
15221522
<strong>flow-into: article-flow;</strong>
1523-
}
1524-
1525-
#region-1, #region-2 {
1523+
}
1524+
1525+
#region-1, #region-2 {
15261526
<strong>flow-from: article-flow;</strong>
1527-
}
1527+
}
15281528

1529-
/* region style "RSA" */
1530-
<strong>@region #region-1, #region-2</strong> {
1529+
/* region style "RSA" */
1530+
<strong>@region #region-1, #region-2</strong> {
15311531
div {...}
15321532
p {...}
1533-
}
1534-
1535-
/* region style "RSB" */
1536-
<strong>@region #region-1</strong> {
1537-
p {...}
1538-
}
1539-
1540-
&lt;/style&gt;
1533+
}
15411534

1542-
&lt;div id="div-1"&gt;
1543-
&lt;p id="p-1"&gt;...&lt;/p&gt;
1544-
&lt;p id="p-2"&gt;...&lt;/p&gt;
1545-
&lt;/div&gt;
1535+
/* region style "RSB" */
1536+
<strong>@region #region-1</strong> {
1537+
p {
1538+
margin-right: 5em;
1539+
}
1540+
}
1541+
&lt;/style&gt;
15461542

1547-
&lt;div id="region-1"&gt;&lt;/div&gt;
1548-
&lt;div id="region-2"&gt;&lt;/div&gt;
1549-
1543+
&lt;div id="region-1"&gt;&lt;/div&gt;
1544+
&lt;div id="region-2"&gt;&lt;/div&gt;
1545+
&lt;/template&gt;
1546+
&lt;/element&gt;
15501547
</pre>
15511548

15521549
<div id="region_styling_illustration"> <img
@@ -1573,26 +1570,26 @@ <h3 id=the-at-region-style-rule><span class=secno>3.5. </span>The @region
15731570
or ‘<code class=css>region-2</code>’.
15741571

15751572
<p>The first rule set ‘<code class=css>div {...}</code>’ applies to
1576-
all <code class=html>&lt;div&gt;</code> elements that fit partially or
1577-
fully into <code class=css>region-1</code>’ or ‘<code
1578-
class=css>region-2</code>’. <code class=html>div-1</code> is split
1573+
all <code>&lt;div&gt;</code> elements that fit partially or fully into
1574+
<code class=css>region-1</code>’ or ‘<code
1575+
class=css>region-2</code>’. <code class=css>div-1</code> is split
15791576
between ‘<code class=css>region-1</code>’ and ‘<code
15801577
class=css>region-2</code>’ and gets the style from this style rule.
15811578

15821579
<p>The second rule set ‘<code class=css>p {...}</code>’ applies to all
1583-
<code class=html>&lt;p&gt;</code> elements that fit into ‘<code
1580+
<code>&lt;p&gt;</code> elements that fit into ‘<code
15841581
class=css>region-1</code>’ or ‘<code class=css>region-2</code>’. In
1585-
our example, both <code class=html>p-1</code> and <code
1586-
class=html>p-2</code> are selected.
1582+
our example, both <code class=css>p-1</code>and <code
1583+
class=css>p-2</code> are selected.
15871584

15881585
<p>The region style ‘<code class=css>RSB</code>’ applies to flow
15891586
content that fits in ‘<code class=css>region-1</code>’.
15901587

1591-
<p>The first rule set ‘<code class=css>p {...}</code>’ matches <code
1592-
class=html>p-1</code> and <code class=html>p-2</code> because these
1593-
paragraphs flow into ‘<code class=css>region-1</code>’. Only the
1594-
fragment of <code class=html>p-2</code> that flows into <code
1595-
class=html>region-1</code> is styled with this rule.
1588+
<p>The first rule set ‘<code class=css>p {...}</code>’ matches
1589+
<code class=css>p-1</code> and <code class=css>p-2</code>
1590+
because these paragraphs flow into ‘<code class=css>region-1</code>’.
1591+
Only the fragment of <code class=css>p-2</code> that flows into
1592+
<code class=css>region-1</code> is styled with this rule.
15961593
</div>
15971594

15981595
<div class=issue-marker data-bug_id=15734 data-bug_status=NEW> <a

css3-regions/Overview.src.html

Lines changed: 59 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ <h3 id="the-region-fragment-property">The region-fragment property</h3>
12071207
<tr>
12081208
<td>''flow-into: "article"''</td>
12091209

1210-
<td><code class="html">region-1</code> and <code class=
1210+
<td><code>region-1</code> and <code class=
12111211
"html">region-2</code></td>
12121212

12131213
<td>''region-fragment: auto''<br>
@@ -1311,51 +1311,48 @@ <h3 id="the-at-region-style-rule">The @region rule</h3>
13111311
<li><a href="http://www.w3.org/TR/css3-background/#the-box-shadow">'box-shadow' property</a></li>
13121312
<li><a href="http://www.w3.org/TR/css3-background/#the-box-decoration-break">'box-decoration-break' property</a></li>
13131313
<li><a href="http://www.w3.org/TR/CSS2/visudet.html#the-width-property">'width' property</a></li>
1314-
</ol>
1315-
1316-
<div class="issue-marker" data-bug_id="19965" data-bug_status="NEW">
1317-
<a href=
1318-
"https://www.w3.org/Bugs/Public/show_bug.cgi?id=19965">Issue-19965</a>
1319-
1320-
<div class="issue-details">
1321-
<p class="short-desc">Rework region styling example to use color changes</p>
1322-
</div>
1323-
</div>
1314+
</ol>
13241315

13251316
<div class="example" id="region-style-example">
13261317
<p>In the following example, the <span>named flow</span> 'article-flow' flows
13271318
through 'region-1' and 'region-2'.</p>
13281319
<pre>
1329-
&lt;style&gt;
1330-
#div-1 {
1320+
&lt;body is="x-region-style-example"&gt;
1321+
&lt;div id="div-1"&gt;
1322+
&lt;p id="p-1"&gt;...&lt;/p&gt;
1323+
&lt;p id="p-2"&gt;...&lt;/p&gt;
1324+
&lt;/div&gt;
1325+
&lt;/body&gt;
1326+
1327+
&lt;element name="x-region-style-example" extends="body"&gt;
1328+
&lt;template&gt;
1329+
&lt;style&gt;
1330+
#div-1 {
13311331
<strong>flow-into: article-flow;</strong>
1332-
}
1333-
1334-
#region-1, #region-2 {
1332+
}
1333+
1334+
#region-1, #region-2 {
13351335
<strong>flow-from: article-flow;</strong>
1336-
}
1336+
}
13371337

1338-
/* region style "RSA" */
1339-
<strong>@region #region-1, #region-2</strong> {
1338+
/* region style "RSA" */
1339+
<strong>@region #region-1, #region-2</strong> {
13401340
div {...}
13411341
p {...}
1342-
}
1343-
1344-
/* region style "RSB" */
1345-
<strong>@region #region-1</strong> {
1346-
p {...}
1347-
}
1348-
1349-
&lt;/style&gt;
1342+
}
13501343

1351-
&lt;div id="div-1"&gt;
1352-
&lt;p id="p-1"&gt;...&lt;/p&gt;
1353-
&lt;p id="p-2"&gt;...&lt;/p&gt;
1354-
&lt;/div&gt;
1344+
/* region style "RSB" */
1345+
<strong>@region #region-1</strong> {
1346+
p {
1347+
margin-right: 5em;
1348+
}
1349+
}
1350+
&lt;/style&gt;
13551351

1356-
&lt;div id="region-1"&gt;&lt;/div&gt;
1357-
&lt;div id="region-2"&gt;&lt;/div&gt;
1358-
1352+
&lt;div id="region-1"&gt;&lt;/div&gt;
1353+
&lt;div id="region-2"&gt;&lt;/div&gt;
1354+
&lt;/template&gt;
1355+
&lt;/element&gt;
13591356
</pre>
13601357

13611358
<div id="region_styling_illustration">
@@ -1384,27 +1381,34 @@ <h3 id="the-at-region-style-rule">The @region rule</h3>
13841381
</ul>
13851382
</div>
13861383

1387-
<p>The region style ''RSA'' applies to flow content that is laid out in either
1388-
'region-1' or 'region-2'.</p>
1389-
1390-
<p>The first rule set ''div {...}'' applies to all <code class=
1391-
"html">&lt;div&gt;</code> elements that fit partially or fully into 'region-1' or
1392-
'region-2'. <code class="html">div-1</code> is split between 'region-1' and
1393-
'region-2' and gets the style from this style rule.</p>
1394-
1395-
<p>The second rule set ''p {...}'' applies to all <code class=
1396-
"html">&lt;p&gt;</code> elements that fit into 'region-1' or
1397-
'region-2'. In our example, both <code class="html">p-1</code>
1398-
and <code class="html">p-2</code> are selected.</p>
1399-
1400-
<p>The region style ''RSB'' applies to flow content that fits in
1401-
'region-1'.</p>
1402-
1403-
<p>The first rule set ''p {...}'' matches <code class="html">p-1</code>
1404-
and <code class="html">p-2</code>
1405-
because these paragraphs flow into 'region-1'. Only the fragment of
1406-
<code class="html">p-2</code> that flows into <code class="html">region-1</code>
1407-
is styled with this rule.</p>
1384+
<p>The region style ''RSA'' applies
1385+
to flow content that is laid out
1386+
in either 'region-1' or 'region-2'.</p>
1387+
1388+
<p>The first rule set ''div {...}'' applies
1389+
to all <code>&lt;div&gt;</code> elements
1390+
that fit partially or fully
1391+
into 'region-1' or 'region-2'.
1392+
'div-1' is split between 'region-1'
1393+
and 'region-2' and gets the style
1394+
from this style rule.</p>
1395+
1396+
<p>The second rule set ''p {...}'' applies
1397+
to all <code>&lt;p&gt;</code> elements
1398+
that fit into 'region-1' or 'region-2'.
1399+
In our example,
1400+
both 'p-1'and 'p-2' are selected.</p>
1401+
1402+
<p>The region style ''RSB'' applies
1403+
to flow content that fits in 'region-1'.</p>
1404+
1405+
<p>The first rule set ''p {...}''
1406+
matches 'p-1' and 'p-2'
1407+
because these paragraphs
1408+
flow into 'region-1'.
1409+
Only the fragment of 'p-2'
1410+
that flows into 'region-1'
1411+
is styled with this rule.</p>
14081412
</div>
14091413

14101414

41 Bytes
Loading

0 commit comments

Comments
 (0)