summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-05-23 22:59:25 +0200
committerLaurenz <laurmaedje@gmail.com>2021-05-23 22:59:25 +0200
commit14f093bfee3d0871d9796a0dcaf1648b76010930 (patch)
tree83cf2e2d56d2d25a154c76c5bf31146eb03ce3c1 /tests/typ
parentcd25b402816b0b4db0b310e3fff179f2a4fd7751 (diff)
A few predefined colors for testing
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/code/let.typ4
-rw-r--r--tests/typ/library/basic.typ2
-rw-r--r--tests/typ/library/circle.typ18
-rw-r--r--tests/typ/library/ellipse.typ6
-rw-r--r--tests/typ/library/font.typ4
-rw-r--r--tests/typ/library/pad.typ2
-rw-r--r--tests/typ/library/rect.typ2
-rw-r--r--tests/typ/library/square.typ6
-rw-r--r--tests/typ/library/stack.typ4
-rw-r--r--tests/typ/markup/basic.typ2
10 files changed, 25 insertions, 25 deletions
diff --git a/tests/typ/code/let.typ b/tests/typ/code/let.typ
index 4f84aa67..49abec53 100644
--- a/tests/typ/code/let.typ
+++ b/tests/typ/code/let.typ
@@ -17,8 +17,8 @@
---
// Syntax sugar for function definitions.
-#let background = #9feb52
-#let rect(body) = rect(width: 2cm, fill: background, pad(5pt, body))
+#let fill = conifer
+#let rect(body) = rect(width: 2cm, fill: fill, pad(5pt, body))
#rect[Hi!]
// Error: 13 expected body
diff --git a/tests/typ/library/basic.typ b/tests/typ/library/basic.typ
index a16215a7..dab0fc17 100644
--- a/tests/typ/library/basic.typ
+++ b/tests/typ/library/basic.typ
@@ -22,4 +22,4 @@
// Error: 3:11-3:11 missing argument: red component
// Error: 2:11-2:11 missing argument: green component
// Error: 1:11-1:11 missing argument: blue component
-#test(rgb(), #000000)
+#test(rgb(), black)
diff --git a/tests/typ/library/circle.typ b/tests/typ/library/circle.typ
index b395ee2b..d2fa928e 100644
--- a/tests/typ/library/circle.typ
+++ b/tests/typ/library/circle.typ
@@ -7,35 +7,35 @@ Auto-sized circle. \
#circle(fill: #eb5278, align(center, center, [But, soft!]))
Center-aligned rect in auto-sized circle.
-#circle(fill: #43a127)[
+#circle(fill: forest)[
#align(center, center)
- #rect(fill: #9feb52, pad(5pt)[But, soft!])
+ #rect(fill: conifer, pad(5pt)[But, soft!])
]
100%-width rect in auto-sized circle. \
-#circle(fill: #43a127, rect(width: 100%, fill: #9feb52)[
+#circle(fill: forest, rect(width: 100%, fill: conifer)[
But, soft! what light through yonder window breaks?
])
Expanded by height.
-#circle(fill: #9feb52)[A \ B \ C]
+#circle(fill: conifer)[A \ B \ C]
---
// Test relative sizing.
#rect(width: 100%, height: 50pt, fill: #aaa)[
#align(center, center)
#font(color: #fff)
- #circle(radius: 10pt, fill: #239DAD)[A]
- #circle(height: 60%, fill: #239DAD)[B]
- #circle(width: 20% + 20pt, fill: #239DAD)[C]
+ #circle(radius: 10pt, fill: eastern)[A]
+ #circle(height: 60%, fill: eastern)[B]
+ #circle(width: 20% + 20pt, fill: eastern)[C]
]
---
// Radius wins over width and height.
// Error: 2:23-2:34 unexpected argument
// Error: 1:36-1:49 unexpected argument
-#circle(radius: 10pt, width: 50pt, height: 100pt, fill: #239DAD)
+#circle(radius: 10pt, width: 50pt, height: 100pt, fill: eastern)
// Width wins over height.
// Error: 22-34 unexpected argument
-#circle(width: 20pt, height: 50pt, fill: #239DAD)
+#circle(width: 20pt, height: 50pt, fill: eastern)
diff --git a/tests/typ/library/ellipse.typ b/tests/typ/library/ellipse.typ
index 06d84a11..9b10eded 100644
--- a/tests/typ/library/ellipse.typ
+++ b/tests/typ/library/ellipse.typ
@@ -3,14 +3,14 @@
---
100% rect in 100% ellipse in fixed rect. \
#rect(width: 3cm, height: 2cm, fill: #2a631a)[
- #ellipse(width: 100%, height: 100%, fill: #43a127)[
- #rect(width: 100%, height: 100%, fill: #9feb52)[
+ #ellipse(width: 100%, height: 100%, fill: forest)[
+ #rect(width: 100%, height: 100%, fill: conifer)[
#align(center, center)[Stuff inside an ellipse!]
]
]
]
Auto-sized ellipse. \
-#ellipse(fill: #9feb52)[
+#ellipse(fill: conifer)[
But, soft! what light through yonder window breaks?
]
diff --git a/tests/typ/library/font.typ b/tests/typ/library/font.typ
index 397452e3..34b08f26 100644
--- a/tests/typ/library/font.typ
+++ b/tests/typ/library/font.typ
@@ -32,13 +32,13 @@ Emoji: 🐪, 🌋, 🏞
]
// Colors.
-#font(color: #239DAD)[This is #font(color: #FA644B)[way more] colorful.]
+#font(color: eastern)[This is #font(color: #FA644B)[way more] colorful.]
---
// Test top and bottom edge.
#page(width: 170pt)
-#let try(top, bottom) = rect(fill: #9feb52)[
+#let try(top, bottom) = rect(fill: conifer)[
#font(top-edge: top, bottom-edge: bottom)
`From `#top` to `#bottom
]
diff --git a/tests/typ/library/pad.typ b/tests/typ/library/pad.typ
index c3d3786b..3726ce53 100644
--- a/tests/typ/library/pad.typ
+++ b/tests/typ/library/pad.typ
@@ -5,7 +5,7 @@
#pad(left: 10pt, [Indented!])
// All sides together.
-#rect(fill: #9feb52,
+#rect(fill: conifer,
pad(10pt, right: 20pt,
rect(width: 20pt, height: 20pt, fill: #eb5278)))
diff --git a/tests/typ/library/rect.typ b/tests/typ/library/rect.typ
index 9acb0975..f450064a 100644
--- a/tests/typ/library/rect.typ
+++ b/tests/typ/library/rect.typ
@@ -6,7 +6,7 @@
#page(width: 150pt)
// Fit to text.
-#rect(fill: #9feb52)[Textbox]
+#rect(fill: conifer)[Textbox]
// Empty with fixed width and height.
#rect(width: 3cm, height: 12pt, fill: #CB4CED)
diff --git a/tests/typ/library/square.typ b/tests/typ/library/square.typ
index deb97853..649d31c0 100644
--- a/tests/typ/library/square.typ
+++ b/tests/typ/library/square.typ
@@ -2,7 +2,7 @@
---
Auto-sized square. \
-#square(fill: #239DAD)[
+#square(fill: eastern)[
#align(center)
#pad(5pt)[
#font(color: #fff, weight: bold)
@@ -19,13 +19,13 @@ Auto-sized square. \
---
// Test height overflow.
#page(width: 75pt, height: 100pt)
-#square(fill: #9feb52)[
+#square(fill: conifer)[
But, soft! what light through yonder window breaks?
]
---
// Test width overflow.
#page(width: 100pt, height: 75pt)
-#square(fill: #9feb52)[
+#square(fill: conifer)[
But, soft! what light through yonder window breaks?
]
diff --git a/tests/typ/library/stack.typ b/tests/typ/library/stack.typ
index c773ec79..d03a95c8 100644
--- a/tests/typ/library/stack.typ
+++ b/tests/typ/library/stack.typ
@@ -4,6 +4,6 @@
#let rect(width, color) = rect(width: width, height: 1cm, fill: color)
#stack(
rect(2cm, #2a631a),
- rect(3cm, #43a127),
- rect(1cm, #9feb52),
+ rect(3cm, forest),
+ rect(1cm, conifer),
)
diff --git a/tests/typ/markup/basic.typ b/tests/typ/markup/basic.typ
index bfe3d2cb..24c23e64 100644
--- a/tests/typ/markup/basic.typ
+++ b/tests/typ/markup/basic.typ
@@ -3,7 +3,7 @@
---
#let linebreak() = [
// Inside the old line break definition is still active.
- #square(length: 3pt, fill: #000) \
+ #square(length: 3pt, fill: black) \
]
A \ B \ C