summaryrefslogtreecommitdiff
path: root/tests/typ/layout
diff options
context:
space:
mode:
authorWenzhuo Liu <mgt@oi-wiki.org>2024-01-09 16:12:08 +0800
committerGitHub <noreply@github.com>2024-01-09 08:12:08 +0000
commitcc1f974164ab5d42c3eb1b8fcd7a9227fbfd1d0e (patch)
tree88a558e197eeb47bf1d51eb24987396843e15a60 /tests/typ/layout
parent23875a04832a79b6c4fa47d243d9af9650839ff6 (diff)
Partially fix hide for line, polygon, table, grid (#3139)
Diffstat (limited to 'tests/typ/layout')
-rw-r--r--tests/typ/layout/hide.typ71
1 files changed, 71 insertions, 0 deletions
diff --git a/tests/typ/layout/hide.typ b/tests/typ/layout/hide.typ
index a979b24f..2cd8333e 100644
--- a/tests/typ/layout/hide.typ
+++ b/tests/typ/layout/hide.typ
@@ -3,3 +3,74 @@
---
AB #h(1fr) CD \
#hide[A]B #h(1fr) C#hide[D]
+---
+Hidden:
+#hide[#line(length: 100%)]
+#line(length: 100%)
+---
+Hidden:
+#hide(table(rows: 2, columns: 2)[a][b][c][d])
+#table(rows: 2, columns: 2)[a][b][c][d]
+---
+Hidden:
+#hide[
+ #polygon((20%, 0pt),
+ (60%, 0pt),
+ (80%, 2cm),
+ (0%, 2cm),)
+]
+#polygon((20%, 0pt),
+ (60%, 0pt),
+ (80%, 2cm),
+ (0%, 2cm),)
+---
+#set rect(
+ inset: 8pt,
+ fill: rgb("e4e5ea"),
+ width: 100%,
+)
+
+Hidden:
+#hide[
+#grid(
+ columns: (1fr, 1fr, 2fr),
+ rows: (auto, 40pt),
+ gutter: 3pt,
+ rect[A],
+ rect[B],
+ rect[C],
+ rect(height: 100%)[D],
+)
+]
+#grid(
+ columns: (1fr, 1fr, 2fr),
+ rows: (auto, 40pt),
+ gutter: 3pt,
+ rect[A],
+ rect[B],
+ rect[C],
+ rect(height: 100%)[D],
+)
+---
+
+Hidden:
+#hide[
+- 1
+- 2
+ 1. A
+ 2. B
+- 3
+]
+
+
+- 1
+- 2
+ 1. A
+ 2. B
+- 3
+
+---
+Hidden:
+#hide(image("/files/tiger.jpg", width: 5cm, height: 1cm,))
+
+#image("/files/tiger.jpg", width: 5cm, height: 1cm,)