Skip to content

Lift Starlight's .main-pane isolation on pages with hero art#197

Closed
kylemclaren wants to merge 1 commit into
mainfrom
lift-main-pane-isolation-for-hero-art
Closed

Lift Starlight's .main-pane isolation on pages with hero art#197
kylemclaren wants to merge 1 commit into
mainfrom
lift-main-pane-isolation-for-hero-art

Conversation

@kylemclaren

Copy link
Copy Markdown
Collaborator

Why

Starlight sets isolation: isolate on .main-pane, which seals the content pane into its own stacking context. Any mix-blend-mode element inside it blends against the isolated group's backdrop — which is fully transparent, because the page background (the <body> color, and in dark mode the fixed #sprites-bg black + green-glow art from Background.astro) paints outside the group. The blend silently no-ops.

This matters for hero art: the Managed Agents guide (#193) ships theme-conditional hero images whose flat black/white backgrounds are meant to be erased into the page via screen/multiply. Without this change those images render as hard-edged rectangles.

What

.main-pane:has(.hero-art) {
  isolation: auto;
}

Scoped via :has(.hero-art) so only pages that actually ship blend-mode hero art opt out of Starlight's default stacking; everything else (e.g. pages relying on contained z-indexes, like the lifecycle diagram) is untouched.

Safety

  • Pure no-op until a page ships .hero-art images — merge order with Add Claude Managed Agents integration guide #193 doesn't matter.
  • On the one affected page, content z-index usage was audited: only the expressive-code copy button (z-index: 2, contained by its own position: relative frame) — nothing that can escape above the navbar.
  • Verified by pixel-sampling a live render: with isolation lifted, blend output exactly matches the backdrop on all four hero edges in both themes, and sidebar/main/ToC backdrops stay continuous.

🤖 Generated with Claude Code

Starlight sets isolation: isolate on .main-pane, which gives any
mix-blend-mode element inside the content pane a transparent backdrop:
the body background and the fixed dark-mode #sprites-bg art paint
outside the isolated group, so blending silently no-ops and hero images
render as flat black/white rectangles instead of merging into the page.

Lift the isolation only on pages containing .hero-art (via :has), so
every other page keeps Starlight's default stacking behavior.

No-op until a page ships .hero-art images (see #193).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Preview Deployment

Name URL
Preview https://pr-197-superfly-sprites-docs.fly.dev

Commit: 71c5ede

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Lighthouse Results

URL Performance Accessibility Best Practices SEO
/ 🟠 86 🟢 100 🟢 96 🟢 100

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ Tests success

Ran against: https://pr-197-superfly-sprites-docs.fly.dev

kylemclaren added a commit that referenced this pull request Jul 2, 2026
A proper alpha export makes the blend-mode approach unnecessary: one
image floats on any backdrop in both themes, so the dark/light variants,
the dark-only/light-only utility, and the hero-art blend rules all go.
Also makes the .main-pane isolation lift (#197) moot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kylemclaren kylemclaren closed this Jul 2, 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