diff options
| author | Michael Färber <01mf02@gmail.com> | 2025-01-23 13:08:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 12:08:48 +0000 |
| commit | dda486a412b31acbf767087c748a62ccc6b510b6 (patch) | |
| tree | 5a4a8d8b9e901d6c61fcefa31061e54d74544ef6 /tests | |
| parent | 52ee33a275063369673d8802fb820db3825a661f (diff) | |
HTML tables (#5666)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/html/basic-table.html | 35 | ||||
| -rw-r--r-- | tests/suite/layout/grid/html.typ | 32 |
2 files changed, 67 insertions, 0 deletions
diff --git a/tests/ref/html/basic-table.html b/tests/ref/html/basic-table.html new file mode 100644 index 00000000..6ba1864e --- /dev/null +++ b/tests/ref/html/basic-table.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + </head> + <body> + <table> + <thead> + <tr> + <th>The</th><th>first</th><th>and</th> + </tr> + <tr> + <th>the</th><th>second</th><th>row</th> + </tr> + </thead> + <tbody> + <tr> + <td>Foo</td><td rowspan="2">Baz</td><td>Bar</td> + </tr> + <tr> + <td>1</td><td>2</td> + </tr> + <tr> + <td colspan="2">3</td><td>4</td> + </tr> + </tbody> + <tfoot> + <tr> + <td>The</td><td>last</td><td>row</td> + </tr> + </tfoot> + </table> + </body> +</html> diff --git a/tests/suite/layout/grid/html.typ b/tests/suite/layout/grid/html.typ new file mode 100644 index 00000000..2a7dfc2c --- /dev/null +++ b/tests/suite/layout/grid/html.typ @@ -0,0 +1,32 @@ +--- basic-table html --- +#table( + columns: 3, + rows: 3, + + table.header( + [The], + [first], + [and], + [the], + [second], + [row], + table.hline(stroke: red) + ), + + table.cell(x: 1, rowspan: 2)[Baz], + [Foo], + [Bar], + + [1], + // Baz spans into the next cell + [2], + + table.cell(colspan: 2)[3], + [4], + + table.footer( + [The], + [last], + [row], + ), +) |
