mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
layout: Implement most of border-collapse
per CSS 2.1 § 17.6.2.
Known issues: * Collapsed borders do not correctly affect the border-box of the table itself. * The content widths of all cells in a column and the content height of all cells in a row is the same in this patch, but not in Gecko and WebKit. * Corners are not painted well. The spec does not say what to do here. * Column spans are not handled well. The spec does not say what to do here either.
This commit is contained in:
parent
92359c7b9a
commit
48299a53cb
22 changed files with 1975 additions and 520 deletions
54
tests/html/border_collapse_test.html
Normal file
54
tests/html/border_collapse_test.html
Normal file
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border: 5px solid yellow;
|
||||
}
|
||||
td {
|
||||
border: 1px solid red;
|
||||
padding: 16px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
td.cell5 {
|
||||
border: 30px solid blue;
|
||||
}
|
||||
td.cell6 {
|
||||
border: 5px solid green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr id="row1">
|
||||
<td> 1
|
||||
<td> 2
|
||||
<td> 3
|
||||
</tr>
|
||||
<tr id="row2">
|
||||
<td> 4
|
||||
<td class="cell5"> 5
|
||||
<td class="cell6"> 6
|
||||
</tr>
|
||||
<tr id="row3">
|
||||
<td> 7
|
||||
<td> 8
|
||||
<td> 9
|
||||
</tr>
|
||||
<tr id="row4">
|
||||
<td> 10
|
||||
<td> 11
|
||||
<td> 12
|
||||
</tr>
|
||||
<tr id="row5">
|
||||
<td> 13
|
||||
<td> 14
|
||||
<td> 15
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue