Skip to content

fix: improve blog card thumbnail alignment in list view#7764

Merged
Rajesh-Nagarajan-11 merged 1 commit into
layer5io:masterfrom
mishradwaterlaw:fix/blog-card-thumbnail-list-view
May 31, 2026
Merged

fix: improve blog card thumbnail alignment in list view#7764
Rajesh-Nagarajan-11 merged 1 commit into
layer5io:masterfrom
mishradwaterlaw:fix/blog-card-thumbnail-list-view

Conversation

@mishradwaterlaw
Copy link
Copy Markdown
Contributor

Description

This PR fixes #7743

Blog card thumbnails in list view were rendering at their intrinsic size due to width: auto; height: auto on .gatsby-image-wrapper img. This left empty space below images since object-fit: cover needs explicit dimensions to work correctly.

Changes (src/components/Card/Card.style.js only):

Set width: 100% height: 100% on gatsby-image-wrapper img. so images fill the fixed-height container

Grid view is unaffected object-fit stays conditionally cover/contain via the existing $listView prop, fix is scoped to Card.style.js, using the prop that already handles list view logic.

Notes for Reviewers
This addresses the same issue as the closed PR #7745, but applies the fix at the component level using the existing $listView prop as suggested by @rishiraj38 .

Signed commits

  • Yes, I signed my commits.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2026-05-31 12:15 UTC

@rishiraj38
Copy link
Copy Markdown
Member

Please apply the same changes made in this PR :
#7745

@mishradwaterlaw mishradwaterlaw force-pushed the fix/blog-card-thumbnail-list-view branch from 88b9609 to 2a79353 Compare May 28, 2026 17:21
@mishradwaterlaw
Copy link
Copy Markdown
Contributor Author

@rishiraj38 thank you for direction,,, after going through PR #7745, ive applied the same changes to blogList.style.js adding overflow: hidden, flex-shrink: 0, object-fit: cover, and explicit width/height on thumbnail images across all breakpoints. ive also applied your resolved review suggestions to Card.style.js making width/height conditional via $listView, and adding border-radius/overflow: hidden to the image wrapper for list view, please let me know if any further changes are needed...

Copy link
Copy Markdown
Member

@rishiraj38 rishiraj38 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mishradwaterlaw It’s not the same. Please check again and apply the correct changes.

@mishradwaterlaw mishradwaterlaw force-pushed the fix/blog-card-thumbnail-list-view branch from e22bc9a to 5b5830c Compare May 30, 2026 11:51
@rishiraj38
Copy link
Copy Markdown
Member

@mishradwaterlaw Sorry, I just checked the PR and noticed it has merge conflicts. Could you please apply only the changes mentioned in this review comment?

#7745 (review)

@mishradwaterlaw mishradwaterlaw force-pushed the fix/blog-card-thumbnail-list-view branch from 5b5830c to 60ae58e Compare May 30, 2026 12:55
@mishradwaterlaw
Copy link
Copy Markdown
Contributor Author

@rishiraj38 pls check once, i have tried to update it with the changes requested in review of that PR,

Signed-off-by: mishradwaterlaw <Tezashmishra@outlook.com>
@Rajesh-Nagarajan-11 Rajesh-Nagarajan-11 merged commit 2598438 into layer5io:master May 31, 2026
4 checks passed
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.

[UI] Blog card images are not properly aligned in list view

4 participants