Skip to content

fix(blog): pin blog-layout: list thumbnail to a fixed aspect ratio - #17

Closed
devalog wants to merge 1 commit into
mainfrom
devin/blog-list-image-aspect-fix
Closed

fix(blog): pin blog-layout: list thumbnail to a fixed aspect ratio#17
devalog wants to merge 1 commit into
mainfrom
devin/blog-list-image-aspect-fix

Conversation

@devalog

@devalog devalog commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #16: the merged example's blog cards look increasingly cropped as you zoom the browser in, going back to normal when you zoom out.

Cause: blog-layout: list's row thumbnail is styled height: 100% of the row with aspect-ratio: auto (not a fixed ratio). Row height is set by the tallest sibling — the text column. Zooming in narrows the effective viewport, which narrows the text column, which wraps the title/excerpt onto more lines, which grows the row — and the image box grows with it, getting taller/narrower relative to its 40%-of-row width. Same photo, object-fit: cover, now squeezed into a different box shape, so more of it gets cropped. This is a platform CSS behavior, independent of the thumbnail URLs/crop params from #16.

Fix: a small styles.css, wired via css: styles.css in docs.yml (same mechanism docs-starter uses), pins .fern-blog-card-list .fern-blog-card-image to a fixed aspect-ratio instead of tracking row height.

fern check passes.

Co-Authored-By: Claude noreply@anthropic.com

blog-layout: list sizes the row thumbnail as `height: 100%` of the row
with `aspect-ratio: auto`. Row height is set by the text column next to
it, so anything that changes line-wrapping (window width, browser zoom,
even a longer title) changes the image box's shape, and object-fit:
cover crops more or less of the photo accordingly — most noticeably,
zooming in narrows the text column, wraps it onto more lines, grows the
row, and squeezes the image into a taller/narrower box.

Override the thumbnail with a fixed aspect-ratio via a small stylesheet
(same `css:` mechanism docs-starter uses) so the crop stays consistent
regardless of viewport width or zoom level.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

@devalog devalog closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant