1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:27:46 +00:00

LibWeb: Add support for table caption

Adds layout support and the CSS caption-side property.
This commit is contained in:
Andi Gallo 2023-06-07 02:10:55 +00:00 committed by Andreas Kling
parent 656f72adc0
commit 940d9b98ae
15 changed files with 353 additions and 21 deletions

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of bottom caption</title>
<style>
* {
font-family: 'SerenitySans';
}
caption {
caption-side: bottom;
}
</style>
</head>
<table id="full-table">
<caption>
A Caption
</caption>
<thead>
<tr>
<td>Head Cell</td>
</tr>
</thead>
<tbody>
<tr>
<td>Body Cell</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Footer Cell</td>
</tr>
</tfoot>
</table>
</html>

View file

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Long caption increases table width</title>
<style>
* {
font-family: 'SerenitySans';
}
table {
border: 2px solid black;
}
td,
th {
border: 1px solid black;
}
</style>
</head>
<table id="full-table">
<caption>
A long caption
</caption>
<thead>
<tr>
<td>A1</td>
<td>A2</td>
</tr>
</thead>
<tbody>
<tr>
<td>B1</td>
<td>B2</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>F1</td>
<td>F2</td>
</tr>
</tfoot>
</table>
</html>