Skip to content

In a single .cr-section, the second sticky figure with width=50% is not vertically centered and is bottom-clipped #189

@pensivedog

Description

@pensivedog

Summary

When two sticky images are placed in the same .cr-section, the second sticky whose image has width=50% is not vertically centered in the viewport and appears cut off at the bottom.

Expected behavior

Each sticky figure should be vertically centered in the sticky pane and fully visible, regardless of whether an earlier/later sticky uses a different image width.

Actual behavior

In the minimal example below, the second sticky (with width=50%) is visually lower and bottom-clipped; it is not vertically centered.

---
format: closeread-html
---

:::{.cr-section}

@cr-one Example text.

@cr-two Example text.

:::{#cr-one}
![](test.png){fig-align="center"}
:::

:::{#cr-two}
![](test.png){width=50% fig-align="center"} 
:::

:::

Notes:

  • test.png is the same asset for both stickies (any reasonably square or vertically taller portrait-oriented image will show it).
  • The issue occurs when one figure is default width and a later figure sets width=50%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions