Skip to content

Add margin-bottom to standalone blog post images#199

Merged
grst merged 3 commits intomainfrom
copilot/prettify-long-form-texts
Mar 21, 2026
Merged

Add margin-bottom to standalone blog post images#199
grst merged 3 commits intomainfrom
copilot/prettify-long-form-texts

Conversation

Copy link
Contributor

Copilot AI commented Mar 21, 2026

Hero images on blog pages have no spacing below them, causing text to butt up directly against images.

  • Add margin-bottom: 1.5rem to standalone img elements inside .post-content (direct children and images inside <p> tags)
  • Scoped selector to > img, > p > img so images inside <figure> elements with captions are not affected
  • text-wrap: pretty was already applied to .post-content, no change needed
.post-content {
    > img,
    > p > img {
        margin-bottom: 1.5rem;
    }
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Prettify long form texts</issue_title>
<issue_description>Pages with problem: https://scverse.org/blog/2024-conference-summary/ and other blog pages

Problem:

  • No spacing below the hero image
  • Text is left aligned, leading to very different line lengths

Proposed solution:

  • Add margin-bottom to hero images
  • Add "text-wrap: prettify" (limited browser support but would be incremental improvement)</issue_description>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

@netlify
Copy link

netlify bot commented Mar 21, 2026

Deploy Preview for jade-cajeta-1bcca0 ready!

Name Link
🔨 Latest commit c05449a
🔍 Latest deploy log https://app.netlify.com/projects/jade-cajeta-1bcca0/deploys/69befb1ec8367c0008526be2
😎 Deploy Preview https://deploy-preview-199--jade-cajeta-1bcca0.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI changed the title [WIP] Add spacing below hero image and text wrapping for blog pages Add margin-bottom to blog post images Mar 21, 2026
Copilot AI requested a review from grst March 21, 2026 20:04
Copilot finished work on behalf of grst March 21, 2026 20:04
@grst
Copy link
Contributor

grst commented Mar 21, 2026

@copilot this breaks the spacing for captions in the newer blog post, e.g. https://scverse.org/blog/2025-conference-summary/

Copy link
Contributor Author

Copilot AI commented Mar 21, 2026

@copilot this breaks the spacing for captions in the newer blog post, e.g. https://scverse.org/blog/2025-conference-summary/

Fixed in c05449a. The selector is now scoped to > img, > p > img so it only targets standalone images (like hero images) and won't affect images inside <figure> elements with captions.

fix-verification

Copilot AI changed the title Add margin-bottom to blog post images Add margin-bottom to standalone blog post images Mar 21, 2026
Copilot finished work on behalf of grst March 21, 2026 20:10
@grst grst marked this pull request as ready for review March 21, 2026 20:13
@grst grst merged commit 4aac727 into main Mar 21, 2026
6 checks passed
@grst grst deleted the copilot/prettify-long-form-texts branch March 21, 2026 20:13
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.

Prettify long form texts

2 participants