Skip to content

Fix header image centering in Mastodon theme#632

Merged
akirk merged 2 commits intomainfrom
fix/mastodon-header-image-centering
Mar 28, 2026
Merged

Fix header image centering in Mastodon theme#632
akirk merged 2 commits intomainfrom
fix/mastodon-header-image-centering

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Mar 28, 2026

Follow-up to #630 which noted "The focus point is not yet respected."

Summary

  • Move the header background image from .mastodon-col-header to .mastodon-col-title-row so that background-position: center correctly centers the image within the visible banner area (Mastodon doesn't expose a focal point for header images, vertical centering is the correct behavior)
  • Remove sticky positioning from the column header so it scrolls with content

Test plan

  • View a friend's profile page with a header image in the Mastodon theme — the banner image should be vertically centered in the title row
  • Scroll down — the header should scroll away, not stick

Test in WordPress Playground

akirk added 2 commits March 28, 2026 16:27
Move the background image from .mastodon-col-header to
.mastodon-col-title-row so that background-position: center
correctly centers the image within the visible banner area,
rather than within the full header including the chips area
(which has its own white background covering the image).
@akirk akirk merged commit 8feb2e7 into main Mar 28, 2026
25 checks passed
@akirk akirk deleted the fix/mastodon-header-image-centering branch March 28, 2026 18:05
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