servo/tests/ref/text_align_complex_ref.html
Patrick Walton 5fdaba05a6 layout: Implement text-align: justify and text-justify per
CSS-TEXT-3 § 7.3.

`text-justify: distribute` is not supported.

The behavior of `text-justify: none` does not seem to match what Firefox
and Chrome do, but it seems to match the spec.

Closes #213.
2015-01-29 17:00:41 -08:00

42 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style>
* { margin: 0px !important; padding: 0px !important; }
div {
width: 100px;
font-size: 10px;
font-family: Ahem, monospace;
padding: 10px !important;
}
section.reference { text-align: left !important; }
section.reference > div { white-space: pre; }
</style>
</head>
<body>
<section class="reference" style="text-align: right; color: #f00;">
<div style="background: #fdd;"> xx xx xx<br /> xxxx</div>
<div style="background: #fdd;"> xx xx xx<br />xxxxxxxxxxxxx</div>
<div style="background: #fdd;">xxxxxxxxxxxxx<br /> xx xx xx<br /> xxxx</div>
</section>
<section class="reference" style="text-align: center; color: #0f0;">
<div style="background: #dfd;"> xx xx xx <br /> xxxx </div>
<div style="background: #dfd;"> xx xx xx <br />xxxxxxxxxxxxx</div>
<div style="background: #dfd;">xxxxxxxxxxxxx<br /> xx xx xx <br /> xxxx </div>
</section>
<section class="reference" style="text-align: justify; color: #00f;">
<div style="background: #ddf;">xx xx xx<br />xxxx</div>
<div style="background: #ddf;">xx xx xx<br />xxxxxxxxxxxxx</div>
<div style="background: #ddf;">xxxxxxxxxxxxx<br />xx xx xx<br />xxxx </div>
</section>
</body>
</html>