mirror of
https://github.com/servo/servo.git
synced 2025-09-06 13:08:21 +01:00
Fix table vertical alignment (middle, bottom, not yet baseline) with differing height cells
Includes reftest for this behaviour Patch fixes margin-collapse-clear-002,3,8,9
This commit is contained in:
parent
2de3b119a9
commit
b1debc40be
9 changed files with 102 additions and 12 deletions
|
@ -1,3 +0,0 @@
|
|||
[margin-collapse-clear-002.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[margin-collapse-clear-003.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[margin-collapse-clear-008.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[margin-collapse-clear-009.htm]
|
||||
type: reftest
|
||||
expected: FAIL
|
|
@ -6022,6 +6022,18 @@
|
|||
"url": "/_mozilla/mozilla/table_valign_middle.html"
|
||||
}
|
||||
],
|
||||
"mozilla/table_valign_uneven_height.html": [
|
||||
{
|
||||
"path": "mozilla/table_valign_uneven_height.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/mozilla/table_valign_uneven_height_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/mozilla/table_valign_uneven_height.html"
|
||||
}
|
||||
],
|
||||
"mozilla/webgl/clearcolor.html": [
|
||||
{
|
||||
"path": "mozilla/webgl/clearcolor.html",
|
||||
|
@ -15110,6 +15122,18 @@
|
|||
"url": "/_mozilla/mozilla/table_valign_middle.html"
|
||||
}
|
||||
],
|
||||
"mozilla/table_valign_uneven_height.html": [
|
||||
{
|
||||
"path": "mozilla/table_valign_uneven_height.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/mozilla/table_valign_uneven_height_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/mozilla/table_valign_uneven_height.html"
|
||||
}
|
||||
],
|
||||
"mozilla/webgl/clearcolor.html": [
|
||||
{
|
||||
"path": "mozilla/webgl/clearcolor.html",
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Vertical Alignment for row with uneven height cells</title>
|
||||
<link rel="match" href="table_valign_uneven_height_ref.html">
|
||||
<style>
|
||||
td {
|
||||
border: 5px black solid;
|
||||
border-spacing: 0;
|
||||
padding: 0;
|
||||
}
|
||||
td {
|
||||
vertical-align: middle;
|
||||
background-color: green;
|
||||
}
|
||||
.b {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
div {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
background-color: blue;
|
||||
}
|
||||
.c {
|
||||
height: 100px !important;
|
||||
background-color: red !important;
|
||||
}
|
||||
</style>
|
||||
<table>
|
||||
<tr>
|
||||
<td><div class="c"></div></td>
|
||||
<td><div></div></td>
|
||||
<td class="b"><div></div></td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,34 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference: Vertical Alignment for row with uneven height cells</title>
|
||||
<style>
|
||||
td {
|
||||
background-color: green;
|
||||
border: 5px black solid;
|
||||
border-spacing: 0;
|
||||
padding: 0;
|
||||
}
|
||||
div {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
background-color: blue;
|
||||
}
|
||||
.c {
|
||||
height: 100px !important;
|
||||
background-color: #f00 !important;
|
||||
}
|
||||
.middle {
|
||||
margin-top: 25px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.bottom {
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="a"><div class="c"></div></td>
|
||||
<td class="a"><div class="middle"></div></td>
|
||||
<td class="b"><div class="bottom"></div></td>
|
||||
</tr>
|
||||
</table>
|
Loading…
Add table
Add a link
Reference in a new issue