hyphenation-control-1

CSS Text 6.1. Hyphenation Control: the hyphens property

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
Test checks that automatic hyphenation opportunities within a word must be ignored if the word contains a conditional hyphen (­ or U+00AD), in favor of the conditional hyphen(s).

Source

 1 <!DOCTYPE html>
 2 <html><head>
 3 <meta charset="utf-8">
 4 <title>CSS Text 6.1. Hyphenation Control: the hyphens property</title>
 5 <link href="mailto:jeremychen@mozilla.com" rel="author" title="Chun-Min (Jeremy) Chen">
 6 <link href="https://www.mozilla.org" rel="author" title="Mozilla">
 7 <link href="https://drafts.csswg.org/css-text-3/#valdef-hyphens-auto" rel="help">
 8 <link href="reference/hyphenation-control-1-ref.htm" rel="match">
 9 <meta content="Test checks that automatic hyphenation opportunities within a word
10 must be ignored if the word contains a conditional hyphen (­ or U+00AD), in favor of the
11 conditional hyphen(s)." name="assert">
12 <style>
13 code {
14   display:block;
15   hyphens:auto;
16   border: 1px solid black;
17 }
18 </style>
19 </head>
20 <body lang="en-us">
21 <!--
22   Hyphenation opportunities of the texts in this test are as follows,
23 
24         frag[A]ilis[A]tic[C]ex[A]pi[A]ali
25 
26   where [A] is an automatic hyphen, and [C] is a conditional hyphen.
27 
28   In this test, we set width to somewhere after the conditional hyphen,
29   then we see if automatic hyphen breaks are ignored correctly.
30 -->
31 <code style="width:12ch;">
32 fragilistic­expiali
33 </code>
34 <br>
35 <code style="width:14ch;">
36 fragilistic­expiali
37 </code>
38 <br>
39 <code style="width:16ch;">
40 fragilistic­expiali
41 </code>
42 
43 
44 </body></html>