summaryrefslogtreecommitdiff
path: root/docs/modules/theme
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-07-07 23:41:22 -0600
committerDan Allen <dan.j.allen@gmail.com>2022-07-08 00:41:33 -0600
commit8f859d7e158ba53e2d872df4e1a8d91cb752aa93 (patch)
treeea662972e768d7ba81cd89910e3f079c0ec2eb07 /docs/modules/theme
parenta8ad369e77f92a459940f9f0030c1d9bd2b64899 (diff)
explain in more detail why an image width is required to properly support the fit-content value of max-width
Diffstat (limited to 'docs/modules/theme')
-rw-r--r--docs/modules/theme/pages/block-image.adoc7
-rw-r--r--docs/modules/theme/pages/block-images.adoc8
2 files changed, 9 insertions, 6 deletions
diff --git a/docs/modules/theme/pages/block-image.adoc b/docs/modules/theme/pages/block-image.adoc
index 3ec72cc2..f608e6e1 100644
--- a/docs/modules/theme/pages/block-image.adoc
+++ b/docs/modules/theme/pages/block-image.adoc
@@ -177,7 +177,7 @@ image:
caption:
end: top
-|<<caption-max-width,caption-max-width>>
+|xref:block-images.adoc#caption-max-width[caption-max-width]
|`fit-content` {vbar} `fit-content`(percentage) {vbar} `none` {vbar} xref:measurement-units.adoc[Measurement] +
(default: `none`)
|[source]
@@ -197,8 +197,3 @@ image:
// DANGER! Do not describe or add extra information about the block image caption keys here! Such information, examples, etc., belongs on the block-images.adoc page. The caption max width section below will be moved there once there's time to document it.
// Seriously. I've got velociraptors and green slime.
-
-[#caption-max-width]
-=== Caption max width
-
-For an image to be sized correctly when `max-width` is assigned the value `fit-content`, a width should always be specified on the image.
diff --git a/docs/modules/theme/pages/block-images.adoc b/docs/modules/theme/pages/block-images.adoc
index b2b93a9c..1821cbd6 100644
--- a/docs/modules/theme/pages/block-images.adoc
+++ b/docs/modules/theme/pages/block-images.adoc
@@ -69,3 +69,11 @@ When the value is `inherit`, the key will inherit the alignment assigned to the
The `caption-text-align` key is distinct from the similarly-named `caption-align` key.
The <<caption-align,caption-align key>> aligns a caption block horizontally within its container.
+
+[#caption-max-width]
+=== Caption max width
+
+In order for an image to be sized and positioned correctly when `max-width` is `fit-content`, a width should always be specified on the image.
+This is especially true for "`keep together`" logic to work correctly.
+The arranger cannot know the height of the image plus caption unless it knows how much space the caption will need, and that can't be known when `max-width` is `fit-content` until the width of the image is known.
+Thus, we recommend that you always specify the width of an image, preferably using the `pdfwidth` attribute.