summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/typst/src/visualize/gradient.rs13
-rw-r--r--crates/typst/src/visualize/pattern.rs11
2 files changed, 13 insertions, 11 deletions
diff --git a/crates/typst/src/visualize/gradient.rs b/crates/typst/src/visualize/gradient.rs
index bd08254c..e4878527 100644
--- a/crates/typst/src/visualize/gradient.rs
+++ b/crates/typst/src/visualize/gradient.rs
@@ -72,12 +72,13 @@ use crate::visualize::{Color, ColorSpace, WeightedColor};
/// stops evenly.
///
/// # Relativeness
-/// The location of the `{0%}` and `{100%}` stops is dependant on the dimensions
-/// of a container. This container can either be the shape they are painted on,
-/// or the closest surrounding container. This is controlled by the `relative`
-/// argument of a gradient constructor. By default, gradients are relative to
-/// the shape they are painted on, unless the gradient is applied on text, in
-/// which case they are relative to the closest ancestor container.
+/// The location of the `{0%}` and `{100%}` stops depends on the dimensions
+/// of a container. This container can either be the shape that it is being
+/// painted on, or the closest surrounding container. This is controlled by the
+/// `relative` argument of a gradient constructor. By default, gradients are
+/// relative to the shape they are being painted on, unless the gradient is
+/// applied on text, in which case they are relative to the closest ancestor
+/// container.
///
/// Typst determines the ancestor container as follows:
/// - For shapes that are placed at the root/top level of the document, the
diff --git a/crates/typst/src/visualize/pattern.rs b/crates/typst/src/visualize/pattern.rs
index d4609fbf..a181ad0d 100644
--- a/crates/typst/src/visualize/pattern.rs
+++ b/crates/typst/src/visualize/pattern.rs
@@ -80,11 +80,12 @@ use crate::World;
///
/// # Relativeness
/// The location of the starting point of the pattern is dependent on the
-/// dimensions of a container. This container can either be the shape they
-/// are painted on, or the closest surrounding container. This is controlled by
-/// the `relative` argument of a pattern constructor. By default, patterns are
-/// relative to the shape they are painted on, unless the pattern is applied on
-/// text, in which case they are relative to the closest ancestor container.
+/// dimensions of a container. This container can either be the shape that it is
+/// being painted on, or the closest surrounding container. This is controlled
+/// by the `relative` argument of a pattern constructor. By default, patterns
+/// are relative to the shape they are being painted on, unless the pattern is
+/// applied on text, in which case they are relative to the closest ancestor
+/// container.
///
/// Typst determines the ancestor container as follows:
/// - For shapes that are placed at the root/top level of the document, the