summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-08 13:02:41 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-08 14:35:33 +0100
commitd7a65fa26d131179d9d82226e5ee1b562084e48a (patch)
treec21ab20e9fb851e14e1ebea3e14fc351b1fdbcc9 /docs
parente5eab73374880077971f3f22acbdd3d302877128 (diff)
Rework style chain access
Diffstat (limited to 'docs')
-rw-r--r--docs/src/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/src/lib.rs b/docs/src/lib.rs
index 7ddc1c70..563d565c 100644
--- a/docs/src/lib.rs
+++ b/docs/src/lib.rs
@@ -39,10 +39,12 @@ static FONTS: Lazy<(Prehashed<FontBook>, Vec<Font>)> = Lazy::new(|| {
static LIBRARY: Lazy<Prehashed<Library>> = Lazy::new(|| {
let mut lib = typst_library::build();
- lib.styles.set(PageNode::WIDTH, Smart::Custom(Abs::pt(240.0).into()));
- lib.styles.set(PageNode::HEIGHT, Smart::Auto);
lib.styles
- .set(PageNode::MARGIN, Sides::splat(Some(Smart::Custom(Abs::pt(15.0).into()))));
+ .set(PageNode::set_width(Smart::Custom(Abs::pt(240.0).into())));
+ lib.styles.set(PageNode::set_height(Smart::Auto));
+ lib.styles.set(PageNode::set_margin(Sides::splat(Some(Smart::Custom(
+ Abs::pt(15.0).into(),
+ )))));
typst::eval::set_lang_items(lib.items.clone());
Prehashed::new(lib)
});