layout: Implement word-break: break-all per CSS3-TEXT § 5.2.

This commit is contained in:
Patrick Walton 2015-01-01 16:34:51 -05:00
parent df6a7959df
commit 0627d4c599
5 changed files with 95 additions and 28 deletions

View file

@ -224,3 +224,4 @@ fragment=top != ../html/acid2.html acid2_ref.html
== border_radius_clip_a.html border_radius_clip_ref.html
== stacking_context_overflow_a.html stacking_context_overflow_ref.html
== stacking_context_overflow_relative_outline_a.html stacking_context_overflow_relative_outline_ref.html
== word_break_a.html word_break_ref.html

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that `word-break: break-all` works. -->
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style>
html, body {
margin: 0;
}
section {
word-break: break-all;
width: 300px;
color: purple;
}
</style>
</head>
<body>
<section>X XXXXXXX</section>
</body>
</html>

View file

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that `word-break: break-all` works. -->
<style>
div {
background: purple;
position: absolute;
}
#a {
width: 100px;
left: 0;
top: 0;
height: 100px;
}
#b {
left: 200px;
top: 0;
width: 100px;
height: 100px;
}
#c {
left: 0;
top: 100px;
width: 300px;
height: 200px;
}
</style>
</head>
<body>
<div id=a></div><div id=b></div><div id=c></div>
</body>
</html>