summaryrefslogtreecommitdiff
path: root/tests/typ/layout/table-cell.typ
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2024-01-17 12:52:28 -0300
committerGitHub <noreply@github.com>2024-01-17 15:52:28 +0000
commit21585e03cfcc47ad283c162e4a2959ea5f8fbd6f (patch)
treefa1440df6f99af38c17a460183bb75e0c0873989 /tests/typ/layout/table-cell.typ
parent7cb257a1accdf0af99b7210a2db53ea562764e15 (diff)
Table cell `x` and `y` fields [More Flexible Tables Pt.2b] (#3050)
Diffstat (limited to 'tests/typ/layout/table-cell.typ')
-rw-r--r--tests/typ/layout/table-cell.typ22
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]
+ )
+}