mirror of
https://github.com/servo/servo.git
synced 2025-06-16 12:24:29 +00:00
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.)
40 lines
655 B
HTML
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>
|