fix: blog list view card layout and image styling#7734
Conversation
|
fb1f811 to
786da99
Compare
786da99 to
2425534
Compare
|
|
||
| .gatsby-image-wrapper img, | ||
| .old-gatsby-image-wrapper img { | ||
| object-fit: contain !important; |
There was a problem hiding this comment.
@rishiraj38 Please don't use !important, try to find root cause.
There was a problem hiding this comment.
The Card component hardcodes flex-direction: column in its own styled-component (CardWrapper). The BlogList wrapper's CSS can't override it because styled-components' scoped class has equal/higher specificity. Fix: pass a listView prop to Card so it conditionally renders flex-direction: row from within its own styles.
Signed-off-by: Rishi Raj <rishiraj438gt@gmail.com>
f708838 to
4e89ee3
Compare
|
@rishiraj38 Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂 |
|
@Rajesh-Nagarajan-11 I think my voice wasn't clear, so here’s the main Crux: The Card component hardcodes The fix is to pass a Also, the CSS removed from |
|
@Rajesh-Nagarajan-11, any more changes required? |




Description
This PR fixes Blog list view.
Notes for Reviewers
Root cause: The Card component (Card.style.js) has
flex-direction: columnandmin-height: 23remhardcoded on .post-block. The BlogList wrapper tried to override these from the parent, but it couldn't win because styled-components scopes the Card's styles with a unique class, so the Card's own column layout always takes priority over the parent's overrides.Signed commits