Skip to content

Commit 3b5ff82

Browse files
committed
adding :nth(), adding hyphenate-last-line-avoid, adding an optional value to hyphenate-character
1 parent c1f39f1 commit 3b5ff82

1 file changed

Lines changed: 128 additions & 7 deletions

File tree

css3-gcpm/Overview.src.html

Lines changed: 128 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,13 +1506,15 @@ <h3>The 'hyphenate-lines' property</h3>
15061506
honor the specified value. The ''no-limit'' value means that there is
15071507
no limit.
15081508

1509+
<h3>The 'hyphenate-character' property</h3>
1510+
15091511
<table class=propdef>
15101512
<tr>
15111513
<td><em>Name:</em>
15121514
<td><dfn>hyphenate-character</dfn>
15131515
<tr>
15141516
<td><em>Value:</em>
1515-
<td>auto | &lt;string>
1517+
<td>auto | &lt;string> &lt;string>?
15161518
<tr>
15171519
<td><em>Initial:</em>
15181520
<td>auto
@@ -1533,9 +1535,11 @@ <h3>The 'hyphenate-lines' property</h3>
15331535
<td>specified value
15341536
</table>
15351537

1536-
<p>This property specifies a string that is shown when a
1537-
hyphenate-break occurs. The 'auto' value means that the user agent
1538-
should find an appropriate value.
1538+
<p>This property specifies strings that are shown between parts of
1539+
hyphenated words. The 'auto' value means that the user agent should
1540+
find an appropriate value. If one string is specified, it appears at
1541+
the end of lines. If two strings are specified, the second string
1542+
appears at the beginning of lines.
15391543

15401544
<!--
15411545
<p class=issue>Which character is it, "minus hyphen" or U+2010?
@@ -1551,9 +1555,68 @@ <h3>The 'hyphenate-lines' property</h3>
15511555
</pre>
15521556
</div>
15531557

1554-
<!--
1555-
<p class=issue>XSL uses a different list of <a href="http://www.w3.org/TR/2006/CR-xsl11-20060220/#common-hyphenation-properties">properties</a>. Reuse of these properties has been considered.
1556-
-->
1558+
1559+
<h3>The 'hyphenate-last-line-avoid' property</h3>
1560+
1561+
<table class=propdef>
1562+
<tr>
1563+
<td><em>Name:</em>
1564+
<td><dfn>hyphenate-last-line-avoid</dfn>
1565+
<tr>
1566+
<td><em>Value:</em>
1567+
<td>auto | always | column | page | spread
1568+
<tr>
1569+
<td><em>Initial:</em>
1570+
<td>auto
1571+
<tr>
1572+
<td><em>Applies to:</em>
1573+
<td>block-level elements
1574+
<tr>
1575+
<td><em>Inherited:</em>
1576+
<td>yes
1577+
<tr>
1578+
<td><em>Percentages:</em>
1579+
<td>N/A
1580+
<tr>
1581+
<td><em>Media:</em>
1582+
<td>visual
1583+
<tr>
1584+
<td><em>Computed&nbsp;value:</em>
1585+
<td>specified value
1586+
</table>
1587+
1588+
<p>This property indicates hyphenation behavior at the end of elements, column, pages and spreads. A spread is a set of two pages that are visible to the reader at the same time. Values are:
1589+
1590+
<dl>
1591+
<dt>auto
1592+
1593+
<dd>no restrictions imposed
1594+
1595+
<dt>always
1596+
1597+
<dd>the last full line of the element, or the last line before any column, page, or spread break inside the element should not be hyphenated.
1598+
1599+
<dt>column
1600+
1601+
<dd>the last line before any column, page, or spread break inside the element should not be hyphenated
1602+
1603+
<dt>page
1604+
1605+
<dd>the last line before page or spread break inside the element should not be hyphenated
1606+
1607+
1608+
<dt>spread
1609+
1610+
<dd>the last line before any spread break inside the element should not be hyphenated.
1611+
1612+
</dl>
1613+
1614+
<div class=example>
1615+
<pre>
1616+
p { hyphenate-last-line-avoid: always }
1617+
div.chapter { hyphenate-last-line-avoid: spread }
1618+
</div>
1619+
<div>
15571620

15581621

15591622
<h2>New counter styles</h2>
@@ -2316,6 +2379,64 @@ <h2>Styling blank pages</h2>
23162379
</div>
23172380

23182381

2382+
<h2>Page selection: nth()</h2>
2383+
2384+
2385+
<p>In CSS 2.0, <a href="http://www.w3.org/TR/CSS2/page.html#page-selectors">first, left and right pages</a> can be selected. This specification adds support for selecting the nth page in the document, or the nth named page.
2386+
2387+
<div class=example>
2388+
<p>This example sets the background color of the second page in the document:
2389+
2390+
<pre>
2391+
@page :nth(2) {
2392+
background: green;
2393+
}
2394+
<pre>
2395+
</div>
2396+
2397+
<div class=example>
2398+
<p>This example sets the background color of the second page of all chapters in a document:
2399+
2400+
<pre>
2401+
@page chapter {
2402+
background: yellow;
2403+
}
2404+
@page chapter:nth(2) {
2405+
background: green;
2406+
}
2407+
div.chapter {
2408+
page: chapter;
2409+
}
2410+
<pre>
2411+
</div>
2412+
2413+
<p>The arguments to the nth() functional notation is the same as for the <a href="http://www.w3.org/TR/css3-selectors/#nth-child-pseudo">nth-child()</a> pseudo-class.
2414+
2415+
<div class="example">
2416+
<pre>
2417+
@page chapter:nth(2n+1) {
2418+
background: green;
2419+
}
2420+
</pre>
2421+
</div>
2422+
2423+
<p>Even when a named page is not defined through an <code>@page <em>name</em> { .. }</code> construct, the name can still be used with :nth().
2424+
2425+
<div class="example">
2426+
<p>Even when the first line is commented out, the second page of all chapters in the document will be green.
2427+
2428+
<pre>
2429+
/* @page chapter { ... } */
2430+
2431+
@page chapter:nth(2) {
2432+
background: green;
2433+
}
2434+
2435+
div.chapter { page: chapter }
2436+
</pre>
2437+
</div>
2438+
2439+
23192440

23202441

23212442
<h2>Page floats</h2>

0 commit comments

Comments
 (0)