summaryrefslogtreecommitdiff
path: root/tests/typ/layout/grid-styling.typ
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2024-01-05 16:30:07 -0300
committerGitHub <noreply@github.com>2024-01-05 19:30:07 +0000
commit8fa573a9a203084ede03cb2f22a54a4b5973bb88 (patch)
treea670f6e017e800cc6566104cd4b72cf69fb788cb /tests/typ/layout/grid-styling.typ
parenta124694f08d9e1592b5d4a69ff7ad293bd248f82 (diff)
Initial table per-cell customization [More Flexible Tables Pt.2a] (#3037)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests/typ/layout/grid-styling.typ')
-rw-r--r--tests/typ/layout/grid-styling.typ45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/typ/layout/grid-styling.typ b/tests/typ/layout/grid-styling.typ
index 577e15c4..e076d0c4 100644
--- a/tests/typ/layout/grid-styling.typ
+++ b/tests/typ/layout/grid-styling.typ
@@ -87,3 +87,48 @@ a
[A],
[B],
)
+
+---
+// Test interaction with gutters.
+#grid(
+ columns: (3em, 3em),
+ fill: (x, y) => (red, blue).at(calc.rem(x, 2)),
+ align: (x, y) => (left, right).at(calc.rem(y, 2)),
+ [A], [B],
+ [C], [D],
+ [E], [F],
+ [G], [H]
+)
+
+#grid(
+ columns: (3em, 3em),
+ fill: (x, y) => (red, blue).at(calc.rem(x, 2)),
+ align: (x, y) => (left, right).at(calc.rem(y, 2)),
+ row-gutter: 5pt,
+ [A], [B],
+ [C], [D],
+ [E], [F],
+ [G], [H]
+)
+
+#grid(
+ columns: (3em, 3em),
+ fill: (x, y) => (red, blue).at(calc.rem(x, 2)),
+ align: (x, y) => (left, right).at(calc.rem(y, 2)),
+ column-gutter: 5pt,
+ [A], [B],
+ [C], [D],
+ [E], [F],
+ [G], [H]
+)
+
+#grid(
+ columns: (3em, 3em),
+ fill: (x, y) => (red, blue).at(calc.rem(x, 2)),
+ align: (x, y) => (left, right).at(calc.rem(y, 2)),
+ gutter: 5pt,
+ [A], [B],
+ [C], [D],
+ [E], [F],
+ [G], [H]
+)