summaryrefslogtreecommitdiff
path: root/crates/typst-layout/src/inline
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-layout/src/inline')
-rw-r--r--crates/typst-layout/src/inline/box.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/typst-layout/src/inline/box.rs b/crates/typst-layout/src/inline/box.rs
index 30572e4e..62054bea 100644
--- a/crates/typst-layout/src/inline/box.rs
+++ b/crates/typst-layout/src/inline/box.rs
@@ -61,8 +61,7 @@ pub fn layout_box(
// Clip the contents, if requested.
if elem.clip(styles) {
- let size = frame.size() + outset.relative_to(frame.size()).sum_by_axis();
- frame.clip(clip_rect(size, &radius, &stroke));
+ frame.clip(clip_rect(frame.size(), &radius, &stroke, &outset));
}
// Add fill and/or stroke.