mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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.
This commit is contained in:
parent
f58a129251
commit
5fdaba05a6
17 changed files with 528 additions and 63 deletions
42
tests/ref/text_align_complex_ref.html
Normal file
42
tests/ref/text_align_complex_ref.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
<!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>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue