summaryrefslogtreecommitdiff
path: root/tests/typ/style
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-08 16:39:37 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-09 12:34:19 +0100
commite089b6ea40015e012302dc55ac5d6cb42ca4876e (patch)
treedbb66237cb996bc880560dfd94ac9b682e1ac985 /tests/typ/style
parent68503b9a07b00bce3f4d377bcfe945452de815ea (diff)
Set rules for everything
Diffstat (limited to 'tests/typ/style')
-rw-r--r--tests/typ/style/construct.typ16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/typ/style/construct.typ b/tests/typ/style/construct.typ
index 65dcaf85..78a74881 100644
--- a/tests/typ/style/construct.typ
+++ b/tests/typ/style/construct.typ
@@ -2,6 +2,7 @@
---
// Ensure that constructor styles aren't passed down the tree.
+// The inner list should have no extra indent.
#set par(leading: 2pt)
#list(
body-indent: 20pt,
@@ -11,7 +12,22 @@
---
// Ensure that constructor styles win, but not over outer styles.
+// The outer paragraph should be right-aligned,
+// but the B should be center-aligned.
#set par(align: center)
#par(align: right)[
A #rect(width: 2cm, fill: conifer, padding: 4pt)[B]
]
+
+---
+// The inner rectangle should also be yellow here.
+// (and therefore invisible)
+[#set rect(fill: yellow);#text(100%, rect(padding: 5pt, rect()))]
+
+---
+// The inner rectangle should not be yellow here.
+A #rect(fill: yellow, padding: 5pt, rect()) B
+
+---
+// The inner list should not be indented extra.
+[#set text(100%);#list(label-indent: 20pt, list[A])]