Skip to content

Commit d6fca46

Browse files
committed
[css-regions] update ::region to match ::content
1 parent e3f5848 commit d6fca46

2 files changed

Lines changed: 62 additions & 76 deletions

File tree

css-regions/Overview.html

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
rel=dcterms.rights>
1313
<meta content="CSS Regions Module Level 1" name=dcterms.title>
1414
<meta content=text name=dcterms.type>
15-
<meta content=2013-11-26 name=dcterms.date>
15+
<meta content=2013-11-27 name=dcterms.date>
1616
<meta content="Vincent Hardy" name=dcterms.creator>
1717
<meta content="Rossen Atanassov" name=dcterms.creator>
1818
<meta content="Alan Stearns" name=dcterms.creator>
@@ -46,7 +46,7 @@
4646

4747
<h1 id=css-regions-module>CSS Regions Module Level 1</h1>
4848

49-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 26 November
49+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 27 November
5050
2013</h2>
5151

5252
<dl>
@@ -235,7 +235,7 @@ <h2 class="no-num no-toc" id=table-of-contents>Table of contents</h2>
235235
</span>The region-fragment property</a>
236236

237237
<li><a href="#the-region-pseudo-element"><span class=secno>3.5.
238-
</span>The ::region() functional pseudo-element</a>
238+
</span>The ::region pseudo-element</a>
239239
</ul>
240240

241241
<li><a href="#multi-column-regions"><span class=secno>4.
@@ -534,21 +534,20 @@ <h3 id=region-styling><span class=secno>1.2. </span>CSS Region names and
534534
<div class=example>
535535
<pre>
536536
&lt;style&gt;
537-
#region1::region(p) {
537+
#region1::region p {
538538
color: #0C3D5F;
539539
font-weight: bold;
540540
}
541541
&lt;/style&gt;</pre>
542542
</div>
543543

544-
<p>The <code class=css>::region()</code> functional pseudo-element takes a
545-
<code class=css>p</code> selector as an argument in this example. The
546-
color and font-weight declarations will apply to any fragments of
547-
paragraphs that are displayed in <code class=css>#region1</code>. The
548-
following figure shows how the rendering changes if we apply this styling
549-
specific to <code>#region1</code>. Note how less text fits into this box
550-
now that the ‘<code class=property>font-weight</code>’ is bold instead
551-
of normal.
544+
<p>The <code class=css>::region</code> pseudo-element is followed by a
545+
<code class=css>p</code> relative selector in this example. The color and
546+
font-weight declarations will apply to any fragments of paragraphs that
547+
are displayed in <code class=css>#region1</code>. The following figure
548+
shows how the rendering changes if we apply this styling specific to
549+
<code>#region1</code>. Note how less text fits into this box now that the
550+
<code class=property>font-weight</code>’ is bold instead of normal.
552551

553552
<div class=figure> <img
554553
alt="Illustrate how changing region styling affects the flow of content."
@@ -1428,46 +1427,37 @@ <h3 id=the-region-fragment-property><span class=secno>3.4. </span>The
14281427
href="#ref-CSS21" rel=biblioentry>[CSS21]<!--{{CSS21}}--></a>).
14291428
</div>
14301429

1431-
<h3 id=the-region-pseudo-element><span class=secno>3.5. </span>The
1432-
::region() functional pseudo-element</h3>
1430+
<h3 id=the-region-pseudo-element><span class=secno>3.5. </span>The ::region
1431+
pseudo-element</h3>
14331432

1434-
<p>A ::region() functional pseudo-element can be appended to a selector
1435-
that matches a <a href="#css-region">CSS Region</a>, and takes a selector
1436-
as an argument. This allows style declarations to be applied to fragments
1437-
of named flow content flowing through particular regions.
1433+
<p>A ::region pseudo-element represents a relationship between a selector
1434+
that matches a <a href="#css-region">CSS Region</a>, and a relative
1435+
selector that matches some named flow content. This allows style
1436+
declarations to be applied to fragments of named flow content flowing into
1437+
particular regions.
14381438

14391439
<pre>
1440-
&lt;region selector&gt;::region(&lt;content selector&gt;) {
1440+
&lt;region selector&gt;::region &lt;content selector&gt; {
14411441
... CSS styling declarations ...
14421442
}
14431443
</pre>
14441444

1445-
<div class=issue-marker> <a
1446-
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=23238">Issue-23238</a>
1447-
1448-
<div class=issue-details>
1449-
<p class=short-desc>Region styling syntax should sync with ‘<code
1450-
class=property>distributed</code>’ from Shadow DOM
1451-
</div>
1452-
</div>
1453-
1454-
<p>When the ::region() pseudo-element is appended to a <a
1445+
<p>When the ::region pseudo-element is appended to a <a
14551446
href="http://www.w3.org/TR/css3-selectors/#selector-syntax">selector</a>
14561447
that matches one or more <a href="#css-region" title="CSS Region">CSS
14571448
Regions</a>, this creates a ‘<code class=css>flow fragment</code>
14581449
selector. The flow fragment selector specifies which range of elements in
1459-
the flow can be matched by the selector argument. The selector argument
1450+
the flow can be matched by the relative selector. The relative selector
14601451
can match elements in the range(s) (see <a href="#ref-DOM"
14611452
rel=biblioentry>[DOM]<!--{{!DOM}}--></a>) of the named flow that are
1462-
displayed in the selected region(s).
1453+
displayed fully or partially in the selected region(s).
14631454

14641455
<p>Elements that are fully or partially in the flow fragment range may
1465-
match a selector argument. However, the style declarations only apply to
1456+
match the relative selector. However, the style declarations only apply to
14661457
the fragment of the element that is displayed in the corresponding
14671458
region(s).
14681459

1469-
<p>Only a limited list of properties apply to a ::region() functional
1470-
pseudo-element:
1460+
<p>Only a limited list of properties apply to a ::region pseudo-element:
14711461

14721462
<ol>
14731463
<li><a href="http://www.w3.org/TR/CSS2/fonts.html">font properties</a>
@@ -1537,7 +1527,7 @@ <h3 id=the-region-pseudo-element><span class=secno>3.5. </span>The
15371527

15381528
<div class=example id=region-style-example>
15391529
<p>In the following example, the <a href="#named-flow0">named flow</a>
1540-
<code class=property>article-flow</code>’ flows through<code
1530+
<code class=property>article-flow</code>’ flows into<code
15411531
class=css>region-1</code>’ and ‘<code class=css>region-2</code>’.
15421532

15431533
<pre>
@@ -1551,7 +1541,7 @@ <h3 id=the-region-pseudo-element><span class=secno>3.5. </span>The
15511541
}
15521542

15531543
/* region styling */
1554-
<strong>#region-1::region(p)</strong> {
1544+
<strong>#region-1::region p </strong> {
15551545
margin-right: 5em;
15561546
}
15571547
&lt;/style&gt;
@@ -1586,19 +1576,18 @@ <h3 id=the-region-pseudo-element><span class=secno>3.5. </span>The
15861576
</div>
15871577

15881578
<p>The region styling applies to flow content that fits in ‘<code
1589-
class=css>region-1</code>’. The selector argument matches ‘<code
1579+
class=css>region-1</code>’. The relative selector matches ‘<code
15901580
class=css>p-1</code>’ and ‘<code class=css>p-2</code>’ because
15911581
these paragraphs flow into ‘<code class=css>region-1</code>’. Only
15921582
the fragment of ‘<code class=css>p-2</code>’ that flows into ‘<code
15931583
class=css>region-1</code>’ is styled with the pseudo-element.
15941584
</div>
15951585

1596-
<p>All of the selectors in a ::region() functional pseudo-element
1597-
contribute to its <a
1586+
<p>All of the selectors in a ::region pseudo-element contribute to its <a
15981587
href="http://www.w3.org/TR/css3-selectors/#specificity">specificity</a>.
1599-
So the specificity of the ::region() pseudo-element in the example above
1588+
So the specificity of the ::region pseudo-element in the example above
16001589
would combine the id selector's specificity with the specificity of the
1601-
type selector in the argument, resulting in a specificity of 101.
1590+
type selector, resulting in a specificity of 101.
16021591

16031592
<p>Selectors that match a given element or element fragment (as described
16041593
above), participate in the <a
@@ -2842,6 +2831,8 @@ <h3 id="changes_from_May_28_2013"><span class=secno>12.1. </span>Changes
28422831
28<sup>th</sup> 2013</a> version</h3>
28432832

28442833
<ul>
2834+
<li>Changed ::region() to ::region
2835+
28452836
<li>display:none elements do not become CSS Regions
28462837

28472838
<li>Clarify accessibility interactions with flow-into

css-regions/Overview.src.html

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,15 @@ <h3 id="region-styling">CSS Region names and styling</h3>
286286
<div class="example">
287287
<pre>
288288
&lt;style&gt;
289-
#region1::region(p) {
289+
#region1::region p {
290290
color: #0C3D5F;
291291
font-weight: bold;
292292
}
293293
&lt;/style&gt;</pre>
294294
</div>
295295

296-
<p>The <code class="css">::region()</code> functional pseudo-element
297-
takes a <code class="css">p</code> selector as an argument in this example.
296+
<p>The <code class="css">::region</code> pseudo-element
297+
is followed by a <code class="css">p</code> relative selector in this example.
298298
The color and font-weight declarations will apply
299299
to any fragments of paragraphs that are
300300
displayed in <code class="css">#region1</code>.
@@ -1257,55 +1257,49 @@ <h3 id="the-region-fragment-property">The region-fragment property</h3>
12571257
</div>
12581258

12591259
<div class="note"><span class="note-prefix">Note </span>
1260-
<p>The 'overflow' property is honored on a region: if region content overflows,
1261-
such as the borders of elements on the
1262-
last line, the 'overflow' property controls the visibility of the overflowing
1263-
content. See the 'overflow' property definition
1264-
([[CSS21]]).</p>
1260+
<p>The 'overflow' property is honored on a region:
1261+
if region content overflows,
1262+
such as the borders of elements
1263+
on the last line,
1264+
the 'overflow' property controls
1265+
the visibility of the overflowing content.
1266+
See the 'overflow' property definition ([[CSS21]]).</p>
12651267
</div>
12661268

1267-
<h3 id="the-region-pseudo-element">The ::region() functional pseudo-element</h3>
1269+
<h3 id="the-region-pseudo-element">The ::region pseudo-element</h3>
12681270

1269-
<p>A ::region() functional pseudo-element can be appended
1270-
to a selector that matches a <span>CSS Region</span>,
1271-
and takes a selector as an argument.
1271+
<p>A ::region pseudo-element represents a relationship between
1272+
a selector that matches a <span>CSS Region</span>,
1273+
and a relative selector that matches some named flow content.
12721274
This allows style declarations to be applied
12731275
to fragments of named flow content flowing
1274-
through particular regions.</p>
1276+
into particular regions.</p>
12751277

12761278
<pre>
1277-
&lt;region selector&gt;::region(&lt;content selector&gt;) {
1279+
&lt;region selector&gt;::region &lt;content selector&gt; {
12781280
... CSS styling declarations ...
12791281
}
12801282
</pre>
12811283

1282-
<div class="issue-marker">
1283-
<a href=
1284-
"https://www.w3.org/Bugs/Public/show_bug.cgi?id=23238">Issue-23238</a>
1285-
1286-
<div class="issue-details">
1287-
<p class="short-desc">Region styling syntax should sync with 'distributed' from Shadow DOM</p>
1288-
</div>
1289-
</div>
1290-
1291-
<p>When the ::region() pseudo-element is appended to a
1284+
<p>When the ::region pseudo-element is appended to a
12921285
<a href="http://www.w3.org/TR/css3-selectors/#selector-syntax">selector</a>
12931286
that matches one or more <span title="CSS Region">CSS Regions</span>,
12941287
this creates a 'flow fragment' selector.
12951288
The flow fragment selector specifies
12961289
which range of elements in the flow
1297-
can be matched by the selector argument.
1298-
The selector argument can match elements
1290+
can be matched by the relative selector.
1291+
The relative selector can match elements
12991292
in the range(s) (see [[!DOM]]) of the named flow
1300-
that are displayed in the selected region(s).</p>
1293+
that are displayed fully or partially
1294+
in the selected region(s).</p>
13011295

13021296
<p>Elements that are fully or partially
1303-
in the flow fragment range may match a selector argument.
1297+
in the flow fragment range may match the relative selector.
13041298
However, the style declarations only apply
13051299
to the fragment of the element
13061300
that is displayed in the corresponding region(s).</p>
13071301

1308-
<p>Only a limited list of properties apply to a ::region() functional pseudo-element:</p>
1302+
<p>Only a limited list of properties apply to a ::region pseudo-element:</p>
13091303

13101304
<ol>
13111305
<li><a href="http://www.w3.org/TR/CSS2/fonts.html">font properties</a></li>
@@ -1331,7 +1325,7 @@ <h3 id="the-region-pseudo-element">The ::region() functional pseudo-element</h3>
13311325

13321326
<div class="example" id="region-style-example">
13331327
<p>In the following example, the <span>named flow</span> 'article-flow' flows
1334-
through 'region-1' and 'region-2'.</p>
1328+
into 'region-1' and 'region-2'.</p>
13351329
<pre>
13361330
&lt;style&gt;
13371331
#div-1 {
@@ -1343,7 +1337,7 @@ <h3 id="the-region-pseudo-element">The ::region() functional pseudo-element</h3>
13431337
}
13441338

13451339
/* region styling */
1346-
<strong>#region-1::region(p)</strong> {
1340+
<strong>#region-1::region p </strong> {
13471341
margin-right: 5em;
13481342
}
13491343
&lt;/style&gt;
@@ -1386,7 +1380,7 @@ <h3 id="the-region-pseudo-element">The ::region() functional pseudo-element</h3>
13861380

13871381
<p>The region styling applies
13881382
to flow content that fits in 'region-1'.
1389-
The selector argument matches 'p-1' and 'p-2'
1383+
The relative selector matches 'p-1' and 'p-2'
13901384
because these paragraphs
13911385
flow into 'region-1'.
13921386
Only the fragment of 'p-2'
@@ -1395,12 +1389,12 @@ <h3 id="the-region-pseudo-element">The ::region() functional pseudo-element</h3>
13951389
</div>
13961390

13971391
<p>All of the selectors
1398-
in a ::region() functional pseudo-element
1392+
in a ::region pseudo-element
13991393
contribute to its <a href="http://www.w3.org/TR/css3-selectors/#specificity">specificity</a>.
1400-
So the specificity of the ::region() pseudo-element
1394+
So the specificity of the ::region pseudo-element
14011395
in the example above would combine
14021396
the id selector's specificity
1403-
with the specificity of the type selector in the argument,
1397+
with the specificity of the type selector,
14041398
resulting in a specificity of 101.</p>
14051399

14061400
<p>Selectors that match a given element or element fragment (as described above),
@@ -2446,6 +2440,7 @@ <h2 id="changes">Changes</h2>
24462440
<h3 id="changes_from_May_28_2013">Changes from <a href="http://www.w3.org/TR/2013/WD-css3-regions-20130528/">May 28<sup>th</sup> 2013</a> version</h3>
24472441

24482442
<ul>
2443+
<li>Changed ::region() to ::region</li>
24492444
<li>display:none elements do not become CSS Regions</li>
24502445
<li>Clarify accessibility interactions with flow-into</li>
24512446
<li>Change NamedFlowCollection to NamedFlowMap</li>

0 commit comments

Comments
 (0)