aboutsummaryrefslogtreecommitdiff
path: root/test/html/render
diff options
context:
space:
mode:
authorCameron Paul <cpaul37@gmail.com>2025-06-17 13:29:34 -0500
committerRodrigo Arias Mallo <rodarima@gmail.com>2025-07-07 23:04:51 +0200
commite3cedc586990f246ad8679a8a91bbfe88a8ac902 (patch)
tree6cc3ced55f694b6db71e129db682899089410dfe /test/html/render
parentcc3f49392384fa02de9c754a3fec069aa24a4843 (diff)
Expand text-align-center test with more test cases
Diffstat (limited to 'test/html/render')
-rw-r--r--test/html/render/text-align-center.html62
-rw-r--r--test/html/render/text-align-center.ref.html58
2 files changed, 112 insertions, 8 deletions
diff --git a/test/html/render/text-align-center.html b/test/html/render/text-align-center.html
index 2924df51..99440dbf 100644
--- a/test/html/render/text-align-center.html
+++ b/test/html/render/text-align-center.html
@@ -3,19 +3,73 @@
<head>
<title>Test text-align: center</title>
<style>
- .outer {
+ .center {
+ background-color:aquamarine;
+ text-align: center;
+ width: 400px;
+ }
+
+ .outer1 {
background-color:coral;
width: 400px;
}
- .inner {
+ .inner1 {
background-color:aquamarine;
text-align: center;
width: 100px;
}
+
+ .outer2 {
+ background-color:coral;
+ text-align: center;
+ width: 400px;
+ }
+ .inner2 {
+ background-color:aquamarine;
+ width: 100px;
+ }
+
+ .outer3 {
+ background-color:coral;
+ width: 400px;
+ }
+ .inner3 {
+ background-color:aquamarine;
+ text-align: center;
+ width: 100px;
+ }
+
+ .outer4 {
+ background-color:coral;
+ text-align: center;
+ width: 400px;
+ }
+ .inner4 {
+ background-color:aquamarine;
+ width: 100px;
+ }
+
+ body > div {
+ margin-bottom: 10px;
+ }
</style>
</head>
<body>
- <div class="outer">
- <div class="inner">center</div>
+ <div class="center">simple centered text</div>
+
+ <div class="outer1">
+ <div class="inner1">nested div with inner center</div>
+ </div>
+
+ <div class="outer2">
+ <div class="inner2">nested div with outer center</div>
+ </div>
+
+ <div class="outer3">
+ <span class="inner3">nested span with inner center</span>
+ </div>
+
+ <div class="outer4">
+ <span class="inner4">nested span with outer center</span>
</div>
</html>
diff --git a/test/html/render/text-align-center.ref.html b/test/html/render/text-align-center.ref.html
index f0048d42..b13e004e 100644
--- a/test/html/render/text-align-center.ref.html
+++ b/test/html/render/text-align-center.ref.html
@@ -8,20 +8,70 @@
margin: 0;
padding: 0;
}
- .outer {
+ table {
+ margin-bottom: 10px;
+ }
+
+ .center {
+ background-color: aquamarine;
+ width: 400px;
+ }
+ .center td {
+ text-align: center;
+ }
+
+ .outer1 {
+ background-color:coral;
+ width: 400px;
+ }
+ .inner1 {
+ background-color:aquamarine;
+ text-align: center;
+ width: 100px;
+ }
+
+ .outer3 {
background-color:coral;
width: 400px;
}
- .inner {
+ .inner3 {
background-color:aquamarine;
text-align: center;
width: 100px;
+ white-space: nowrap;
+ }
+
+ .outer4 {
+ background-color:coral;
+ width: 400px;
+ }
+ .inner4 {
+ background-color:aquamarine;
+ text-align: center;
+ width: 100px;
+ white-space: nowrap;
}
</style>
</head>
<body>
- <table class="outer">
- <tr><td class="inner">center</td><td></td></tr>
+ <table class="center">
+ <tr><td>simple centered text</td><td></td></tr>
+ </table>
+
+ <table class="outer1">
+ <tr><td class="inner1">nested div with inner center</td><td></td></tr>
+ </table>
+
+ <table class="outer1">
+ <tr><td class="inner1">nested div with outer center</td><td></td></tr>
+ </table>
+
+ <table class="outer3">
+ <tr><td class="inner3">nested span with inner center</td><td></td></tr>
+ </table>
+
+ <table class="outer4">
+ <tr><td></td><td class="inner4">nested span with outer center</td><td></td></tr>
</table>
</body>
</html>