summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/basics/desc.typ2
-rw-r--r--tests/typ/compiler/methods-color.typ4
-rw-r--r--tests/typ/compiler/show-selector.typ5
-rw-r--r--tests/typ/layout/grid-1.typ2
-rw-r--r--tests/typ/layout/grid-3.typ4
-rw-r--r--tests/typ/layout/pad.typ1
-rw-r--r--tests/typ/layout/par-knuth.typ2
-rw-r--r--tests/typ/layout/stack-2.typ3
-rw-r--r--tests/typ/math/syntax.typ2
-rw-r--r--tests/typ/text/edge.typ2
-rw-r--r--tests/typ/text/microtype.typ2
-rw-r--r--tests/typ/text/shift.typ4
-rw-r--r--tests/typ/visualize/shape-aspect.typ10
-rw-r--r--tests/typ/visualize/shape-circle.typ6
-rw-r--r--tests/typ/visualize/shape-ellipse.typ5
-rw-r--r--tests/typ/visualize/shape-rect.typ16
-rw-r--r--tests/typ/visualize/shape-square.typ2
17 files changed, 36 insertions, 36 deletions
diff --git a/tests/typ/basics/desc.typ b/tests/typ/basics/desc.typ
index 8147b400..a638098b 100644
--- a/tests/typ/basics/desc.typ
+++ b/tests/typ/basics/desc.typ
@@ -39,7 +39,7 @@ No: list \
// Test grid like show rule.
#show desc: it => table(
columns: 2,
- padding: 3pt,
+ inset: 3pt,
..it.items.map(item => (emph(item(0)), item(1))).flatten(),
)
diff --git a/tests/typ/compiler/methods-color.typ b/tests/typ/compiler/methods-color.typ
index 1188030a..3b165d14 100644
--- a/tests/typ/compiler/methods-color.typ
+++ b/tests/typ/compiler/methods-color.typ
@@ -15,8 +15,8 @@
#rect(width: 1cm, fill: c.negate())
#for x in range(0, 11) {
- square(width: 9pt, fill: c.lighten(x * 10%))
+ square(size: 9pt, fill: c.lighten(x * 10%))
}
#for x in range(0, 11) {
- square(width: 9pt, fill: c.darken(x * 10%))
+ square(size: 9pt, fill: c.darken(x * 10%))
}
diff --git a/tests/typ/compiler/show-selector.typ b/tests/typ/compiler/show-selector.typ
index 0e9823a5..56e82769 100644
--- a/tests/typ/compiler/show-selector.typ
+++ b/tests/typ/compiler/show-selector.typ
@@ -5,7 +5,7 @@
#show raw.where(block: false): rect.with(
radius: 2pt,
outset: (y: 3pt),
- inset: (x: 3pt),
+ inset: (x: 3pt, y: 0pt),
fill: luma(230),
)
@@ -27,6 +27,9 @@ with selectors and justification.
code!("it");
```
+You can use the ```rs *const T``` pointer or
+the ```rs &mut T``` reference.
+
---
#show heading.where(level: 1): set text(red)
#show heading.where(level: 2): set text(blue)
diff --git a/tests/typ/layout/grid-1.typ b/tests/typ/layout/grid-1.typ
index dcc9b474..411fd8d0 100644
--- a/tests/typ/layout/grid-1.typ
+++ b/tests/typ/layout/grid-1.typ
@@ -2,7 +2,6 @@
---
#let cell(width, color) = rect(width: width, height: 2cm, fill: color)
-
#set page(width: 100pt, height: 140pt)
#grid(
columns: (auto, 1fr, 3fr, 0.25cm, 3%, 2mm + 10%),
@@ -21,6 +20,7 @@
)
---
+#set rect(inset: 0pt)
#grid(
columns: (auto, auto, 40%),
column-gutter: 1fr,
diff --git a/tests/typ/layout/grid-3.typ b/tests/typ/layout/grid-3.typ
index c55f22a6..8194da73 100644
--- a/tests/typ/layout/grid-3.typ
+++ b/tests/typ/layout/grid-3.typ
@@ -24,7 +24,7 @@
row-gutter: 10pt,
column-gutter: (0pt, 10%),
align(top, image("/res/rhino.png")),
- align(top, rect(fill: eastern, align(right)[LoL])),
+ align(top, rect(inset: 0pt, fill: eastern, align(right)[LoL])),
[rofl],
[\ A] * 3,
[Ha!\ ] * 3,
@@ -55,7 +55,7 @@
column-gutter: (0pt, 10%),
[A], [B], [C], [D],
grid(columns: 2, [A], [B], [C\ ]*3, [D]),
- align(top, rect(fill: eastern, align(right)[LoL])),
+ align(top, rect(inset: 0pt, fill: eastern, align(right)[LoL])),
[rofl],
[E\ ]*4,
)
diff --git a/tests/typ/layout/pad.typ b/tests/typ/layout/pad.typ
index 9791eae4..4f481502 100644
--- a/tests/typ/layout/pad.typ
+++ b/tests/typ/layout/pad.typ
@@ -5,6 +5,7 @@
#pad(left: 10pt, [Indented!])
// All sides together.
+#set rect(inset: 0pt)
#rect(fill: conifer,
pad(10pt, right: 20pt,
rect(width: 20pt, height: 20pt, fill: rgb("eb5278"))
diff --git a/tests/typ/layout/par-knuth.typ b/tests/typ/layout/par-knuth.typ
index 59349738..dbe13fc4 100644
--- a/tests/typ/layout/par-knuth.typ
+++ b/tests/typ/layout/par-knuth.typ
@@ -14,7 +14,7 @@
]
#let column(title, linebreaks, hyphenate) = {
- rect(width: 132pt, fill: rgb("eee"))[
+ rect(inset: 0pt, width: 132pt, fill: rgb("eee"))[
#set par(linebreaks: linebreaks)
#set text(hyphenate: hyphenate)
#strong(title) \ #story
diff --git a/tests/typ/layout/stack-2.typ b/tests/typ/layout/stack-2.typ
index f88f7a58..a06950f1 100644
--- a/tests/typ/layout/stack-2.typ
+++ b/tests/typ/layout/stack-2.typ
@@ -19,6 +19,5 @@ World! 🌍
#set text(white)
#rect(fill: forest)[
#v(1fr)
- #h(1fr) Hi you! #h(5pt)
- #v(5pt)
+ #h(1fr) Hi you!
]
diff --git a/tests/typ/math/syntax.typ b/tests/typ/math/syntax.typ
index 4500d91e..72b4b7c2 100644
--- a/tests/typ/math/syntax.typ
+++ b/tests/typ/math/syntax.typ
@@ -2,7 +2,7 @@
#set text("Latin Modern Roman")
#show <table>: it => table(
columns: 2,
- padding: 8pt,
+ inset: 8pt,
..it.text
.split("\n")
.map(line => (text(10pt, raw(line, lang: "typ")), eval(line) + [ ]))
diff --git a/tests/typ/text/edge.typ b/tests/typ/text/edge.typ
index 26be4aeb..802c0ddb 100644
--- a/tests/typ/text/edge.typ
+++ b/tests/typ/text/edge.typ
@@ -4,7 +4,7 @@
#set page(width: 160pt)
#set text(size: 8pt)
-#let try(top, bottom) = rect(fill: conifer)[
+#let try(top, bottom) = rect(inset: 0pt, fill: conifer)[
#set text("IBM Plex Mono", top-edge: top, bottom-edge: bottom)
From #top to #bottom
]
diff --git a/tests/typ/text/microtype.typ b/tests/typ/text/microtype.typ
index c1f0d344..69b50500 100644
--- a/tests/typ/text/microtype.typ
+++ b/tests/typ/text/microtype.typ
@@ -5,7 +5,7 @@
#set page(width: 130pt, margin: 15pt)
#set par(justify: true, linebreaks: "simple")
#set text(size: 9pt)
-#rect(fill: rgb(0, 0, 0, 0), width: 100%)[
+#rect(inset: 0pt, fill: rgb(0, 0, 0, 0), width: 100%)[
This is a little bit of text that builds up to
hang-ing hyphens and dash---es and then, you know,
some punctuation in the margin.
diff --git a/tests/typ/text/shift.typ b/tests/typ/text/shift.typ
index 01a83f6e..6fe31bec 100644
--- a/tests/typ/text/shift.typ
+++ b/tests/typ/text/shift.typ
@@ -4,8 +4,8 @@
#table(
columns: 3,
[Typo.], [Fallb.], [Synth],
- [x#super[1]], [x#super[5n]], [x#super[2 #square(width: 6pt)]],
- [x#sub[1]], [x#sub[5n]], [x#sub[2 #square(width: 6pt)]],
+ [x#super[1]], [x#super[5n]], [x#super[2 #square(size: 6pt)]],
+ [x#sub[1]], [x#sub[5n]], [x#sub[2 #square(size: 6pt)]],
)
---
diff --git a/tests/typ/visualize/shape-aspect.typ b/tests/typ/visualize/shape-aspect.typ
index f2dd9b51..d2dc1140 100644
--- a/tests/typ/visualize/shape-aspect.typ
+++ b/tests/typ/visualize/shape-aspect.typ
@@ -4,9 +4,13 @@
// Test relative width and height and size that is smaller
// than default size.
#set page(width: 120pt, height: 70pt)
-#square(width: 50%, align(bottom)[A])
+#set align(center + horizon)
+#square(width: 50%, [A])
#square(height: 50%)
-#box(stack(square(size: 10pt), 5pt, square(size: 10pt, [B])))
+#box(stack(
+ square(size: 10pt),
+ square(size: 20pt, [B])
+))
---
// Test alignment in automatically sized square and circle.
@@ -37,7 +41,7 @@
// Test square that is overflowing due to its aspect ratio.
#set page(width: 40pt, height: 20pt, margin: 5pt)
#square(width: 100%) #parbreak()
-#square(width: 100%)[Hello]
+#square(width: 100%)[Hey]
---
// Size cannot be relative because we wouldn't know
diff --git a/tests/typ/visualize/shape-circle.typ b/tests/typ/visualize/shape-circle.typ
index 13ff67de..23c6fcbd 100644
--- a/tests/typ/visualize/shape-circle.typ
+++ b/tests/typ/visualize/shape-circle.typ
@@ -7,6 +7,7 @@
---
// Test auto sizing.
+#set circle(inset: 0pt)
Auto-sized circle. \
#circle(fill: rgb("eb5278"), stroke: 2pt + black,
@@ -33,13 +34,14 @@ Expanded by height.
---
// Ensure circle directly in rect works.
-#rect(width: 40pt, height: 30pt, fill: forest, circle(fill: conifer))
+#rect(width: 40pt, height: 30pt, fill: forest,
+ circle(fill: conifer))
---
// Test relative sizing.
#let centered(body) = align(center + horizon, body)
#set text(fill: white)
-#rect(width: 100pt, height: 50pt, fill: rgb("aaa"), centered[
+#rect(width: 100pt, height: 50pt, inset: 0pt, fill: rgb("aaa"), centered[
#circle(radius: 10pt, fill: eastern, centered[A]) // D=20pt
#circle(height: 60%, fill: eastern, centered[B]) // D=30pt
#circle(width: 20% + 20pt, fill: eastern, centered[C]) // D=40pt
diff --git a/tests/typ/visualize/shape-ellipse.typ b/tests/typ/visualize/shape-ellipse.typ
index ba4d0d0a..6447d1d0 100644
--- a/tests/typ/visualize/shape-ellipse.typ
+++ b/tests/typ/visualize/shape-ellipse.typ
@@ -5,6 +5,9 @@
#ellipse()
---
+#set rect(inset: 0pt)
+#set ellipse(inset: 0pt)
+
Rect in ellipse in fixed rect. \
#rect(width: 3cm, height: 2cm, fill: rgb("2a631a"),
ellipse(fill: forest, width: 100%, height: 100%,
@@ -23,4 +26,4 @@ Auto-sized ellipse. \
]
-An inline #ellipse(width: 8pt, height: 6pt, outset: (top: 3pt, rest: 5.5pt)) ellipse. \ No newline at end of file
+An inline #ellipse(width: 8pt, height: 6pt, outset: (top: 3pt, rest: 5.5pt)) ellipse.
diff --git a/tests/typ/visualize/shape-rect.typ b/tests/typ/visualize/shape-rect.typ
index 9a115e54..c8518bbd 100644
--- a/tests/typ/visualize/shape-rect.typ
+++ b/tests/typ/visualize/shape-rect.typ
@@ -8,7 +8,7 @@
#set page(width: 150pt)
// Fit to text.
-#rect(fill: conifer, inset: 3pt)[Textbox]
+#rect(fill: conifer)[Textbox]
// Empty with fixed width and height.
#block(rect(
@@ -18,7 +18,7 @@
))
// Fixed width, text height.
-#rect(width: 2cm, fill: rgb("9650d6"), inset: 5pt)[Fixed and padded]
+#rect(width: 2cm, fill: rgb("9650d6"))[Fixed and padded]
// Page width, fixed height.
#rect(height: 1cm, width: 100%, fill: rgb("734ced"))[Topleft]
@@ -45,18 +45,6 @@
]
---
-// Outset padding.
-#set raw(lang: "rust")
-#show raw: it => [
- #set text(8pt)
- #h(5.6pt, weak: true)
- #rect(radius: 3pt, outset: (y: 3pt, x: 2.5pt), fill: rgb(239, 241, 243), it)
- #h(5.6pt, weak: true)
-]
-
-Use the `*const T` pointer or the `&mut T` reference.
-
----
// Error: 15-38 unexpected key "cake", valid keys are "top-left", "top-right", "bottom-right", "bottom-left", "left", "top", "right", "bottom", and "rest"
#rect(radius: (left: 10pt, cake: 5pt))
diff --git a/tests/typ/visualize/shape-square.typ b/tests/typ/visualize/shape-square.typ
index 622fa9c8..8ac9001f 100644
--- a/tests/typ/visualize/shape-square.typ
+++ b/tests/typ/visualize/shape-square.typ
@@ -7,7 +7,7 @@
---
// Test auto-sized square.
-#square(fill: eastern, inset: 5pt)[
+#square(fill: eastern)[
#set text(fill: white, weight: "bold")
Typst
]