summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-13 12:04:26 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-13 12:18:34 +0100
commit72b60dfde751b4a2ab279aa1fcfa559b4a75eb51 (patch)
tree013065649ef0972bd342ad5c5821842a9c48c740 /tests/typ
parentdb49b628f73d3c328aacadbb9126616e7cccfc49 (diff)
Fill and stroke properties for containers
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/compiler/show-selector.typ9
-rw-r--r--tests/typ/compiler/show-text.typ2
-rw-r--r--tests/typ/layout/columns.typ4
-rw-r--r--tests/typ/layout/container-fill.typ7
4 files changed, 14 insertions, 8 deletions
diff --git a/tests/typ/compiler/show-selector.typ b/tests/typ/compiler/show-selector.typ
index ebd84837..d1229eee 100644
--- a/tests/typ/compiler/show-selector.typ
+++ b/tests/typ/compiler/show-selector.typ
@@ -2,16 +2,15 @@
---
// Inline code.
-#show raw.where(block: false): it => box(rect(
+#show raw.where(block: false): box.with(
radius: 2pt,
- outset: (y: 3pt),
+ outset: (y: 2.5pt),
inset: (x: 3pt, y: 0pt),
fill: luma(230),
- it,
-))
+)
// Code blocks.
-#show raw.where(block: true): rect.with(
+#show raw.where(block: true): block.with(
outset: -3pt,
inset: 11pt,
fill: luma(230),
diff --git a/tests/typ/compiler/show-text.typ b/tests/typ/compiler/show-text.typ
index e0fdb793..705c1112 100644
--- a/tests/typ/compiler/show-text.typ
+++ b/tests/typ/compiler/show-text.typ
@@ -28,7 +28,7 @@ Treeworld, the World of worlds, is a world.
---
// This is a fun one.
#set par(justify: true)
-#show regex("\S"): letter => box(rect(inset: 2pt, upper(letter)))
+#show regex("\S"): letter => box(stroke: 1pt, inset: 2pt, upper(letter))
#lorem(5)
---
diff --git a/tests/typ/layout/columns.typ b/tests/typ/layout/columns.typ
index 1d82113c..b5dbf96f 100644
--- a/tests/typ/layout/columns.typ
+++ b/tests/typ/layout/columns.typ
@@ -6,10 +6,10 @@
#set text(lang: "ar", "Noto Sans Arabic", "IBM Plex Serif")
#set columns(gutter: 30pt)
-#box(rect(fill: conifer, height: 8pt, width: 6pt)) وتحفيز
+#box(fill: conifer, height: 8pt, width: 6pt) وتحفيز
العديد من التفاعلات الكيميائية. (DNA) من أهم الأحماض النووية التي تُشكِّل
إلى جانب كل من البروتينات والليبيدات والسكريات المتعددة
-#box(rect(fill: eastern, height: 8pt, width: 6pt))
+#box(fill: eastern, height: 8pt, width: 6pt)
الجزيئات الضخمة الأربعة الضرورية للحياة.
---
diff --git a/tests/typ/layout/container-fill.typ b/tests/typ/layout/container-fill.typ
new file mode 100644
index 00000000..ab5913ab
--- /dev/null
+++ b/tests/typ/layout/container-fill.typ
@@ -0,0 +1,7 @@
+#set page(height: 100pt)
+#let words = lorem(18).split()
+#block(inset: 8pt, fill: aqua, stroke: aqua.darken(30%))[
+ #words.slice(0, 12).join(" ")
+ #box(fill: teal, outset: 2pt)[incididunt]
+ #words.slice(12).join(" ")
+]