diff options
Diffstat (limited to 'tests/typ/layout/table-cell.typ')
| -rw-r--r-- | tests/typ/layout/table-cell.typ | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/typ/layout/table-cell.typ b/tests/typ/layout/table-cell.typ index a4d3bba4..d79298ae 100644 --- a/tests/typ/layout/table-cell.typ +++ b/tests/typ/layout/table-cell.typ @@ -100,3 +100,25 @@ [John], [Dog] ) } + +--- +// Style based on position +#{ + show table.cell: it => { + if it.y == 0 { + strong(it) + } else if it.x == 1 { + emph(it) + } else { + it + } + } + table( + columns: 3, + gutter: 3pt, + [Name], [Age], [Info], + [John], [52], [Nice], + [Mary], [50], [Cool], + [Jake], [49], [Epic] + ) +} |
