You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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
+
<tableclass=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 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.
<p>In CSS 2.0, <ahref="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
+
<divclass=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
+
<divclass=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 <ahref="http://www.w3.org/TR/css3-selectors/#nth-child-pseudo">nth-child()</a> pseudo-class.
2414
+
2415
+
<divclass="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
+
<divclass="example">
2426
+
<p>Even when the first line is commented out, the second page of all chapters in the document will be green.
0 commit comments