servo/tests/ref/text_indent_a.html
Patrick Walton caee309ef4 layout: Implement text-indent per CSS 2.1 § 16.1.
I had to use a somewhat unconventional method of computing text
indentation (propagating from blocks down to inlines) because of the way
containing blocks are handled in Servo.

(As a side note, neither Gecko nor WebKit correctly handles percentages
in `text-align`, at least incrementally -- i.e. when the percentages are
relative to the viewport and the viewport is resized.)
2014-12-12 14:55:41 -08:00

40 lines
655 B
HTML

<!DOCTYPE html>
<html>
<!-- Tests that `text-indent` works, in particular when combined with `text-align`. -->
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style>
section {
color: blue;
position: absolute;
width: 200px;
height: 200px;
}
#a {
left: 0;
top: 0;
text-indent: 100px;
}
#b {
left: 0;
top: 200px;
text-indent: 50%;
}
#b2 {
left: 0;
top: 0;
}
#c {
left: 200px;
top: 0;
text-align: right;
text-indent: 100px;
}
</style>
</head>
<body>
<section id=a>X X</section>
<section id=b><section id=b2>X X</section></section>
<section id=c>X X</section>
</body>
</html>