mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +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
39
tests/ref/text_align_complex_a.html
Normal file
39
tests/ref/text_align_complex_a.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<!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;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<section style="text-align: right; color: #f00;">
|
||||
<div style="background: #fdd;"> xx xx xx xxxx</div>
|
||||
<div style="background: #fdd;"> xx xx xx xxxxxxxxxxxxx</div>
|
||||
<div style="background: #fdd;">xxxxxxxxxxxxx xx xx xx xxxx</div>
|
||||
</section>
|
||||
|
||||
<section style="text-align: center; color: #0f0;">
|
||||
<div style="background: #dfd;"> xx xx xx xxxx </div>
|
||||
<div style="background: #dfd;"> xx xx xx xxxxxxxxxxxxx</div>
|
||||
<div style="background: #dfd;">xxxxxxxxxxxxx xx xx xx xxxx </div>
|
||||
</section>
|
||||
|
||||
<section style="text-align: justify; color: #00f;">
|
||||
<div style="background: #ddf;">xx xx xx xxxx</div>
|
||||
<div style="background: #ddf;">xx xx xx xxxxxxxxxxxxx</div>
|
||||
<div style="background: #ddf;">xxxxxxxxxxxxx xx xx xx xxxx </div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue