Skip to content

Commit acab1e3

Browse files
committed
additional text wrapping example
1 parent a938400 commit acab1e3

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

css-text/hyphens.html

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>overflow-wrap and hyphens: manual</title>
6+
<link rel="stylesheet" href="styles.css" />
7+
<style>
8+
* {
9+
box-sizing: border-box;
10+
}
11+
12+
.box {
13+
border: 4px solid #f76707;
14+
border-radius: 5px;
15+
padding: 10px;
16+
}
17+
</style>
18+
19+
<style class="editable">
20+
.box {
21+
inline-size: 150px;
22+
overflow-wrap: break-word;
23+
hyphens: manual;
24+
}
25+
</style>
26+
</head>
27+
28+
<body>
29+
<section class="preview">
30+
<div class="box">
31+
Llanfair&shy;pwllgwyngy&shy;llgogerychwyrndrobwllllantysiliogogogoch
32+
</div>
33+
</section>
34+
35+
<textarea class="playable playable-css" style="height: 100px;">
36+
.box {
37+
inline-size: 150px;
38+
overflow-wrap: break-word;
39+
hyphens: manual;
40+
}
41+
</textarea>
42+
43+
<textarea class="playable playable-html" style="height: 150px;">
44+
<div class="box">
45+
Llanfair&shy;pwllgwyngy&shy;llgogerychwyrndrobwllllantysiliogogogoch
46+
</div>
47+
</textarea>
48+
49+
<div class="playable-buttons">
50+
<input id="reset" type="button" value="Reset" />
51+
</div>
52+
</body>
53+
<script src="playable.js"></script>
54+
</html>

0 commit comments

Comments
 (0)