Skip to content

feat(beck): theme the zoom lightbox with host CSS variables#68

Merged
phil-scott-78 merged 1 commit into
mainfrom
beck-lightbox-theme
Jul 10, 2026
Merged

feat(beck): theme the zoom lightbox with host CSS variables#68
phil-scott-78 merged 1 commit into
mainfrom
beck-lightbox-theme

Conversation

@phil-scott-78

Copy link
Copy Markdown
Contributor

Summary

  • Replace the lightbox backdrop''s hardcoded rgb(0 0 0/.25) scrim with the host --color-base-* ramp: color-mix of base-50 (light) / base-950 (dark) over transparent, with blur(12px) saturate(0.1) so the page washes out behind the diagram
  • Add an @starting-style block so the backdrop transition has a from-state (::backdrop is newly rendered on every open; the dialog is removed on close, so the cue is entrance-only)
  • Restyle the close button on the same ramp treatment as the .beck-zoom button — its white-on-black styling was designed for a dark scrim and clashed with the new washed-out light backdrop
  • Wrap the cloned SVG in a .beck-lightbox-panel giving the zoomed diagram an opaque theme surface (base-50/base-950 + border + shadow); the surface lives on a wrapper rather than the <svg> because padding on an auto-sized SVG box skews its intrinsic-ratio sizing

Dark mode keys off [data-theme="dark"] — the same signal the Beck SVG itself uses.

Test plan

  • dotnet test --filter FullyQualifiedName~BeckZoomHeadContributor (4 passed)
  • Visual check on the docs site: open a beck diagram lightbox in light and dark mode; verify the entrance fade, the washed-out page behind, and no color seam between the panel and the diagram''s own surface

Replace the hardcoded rgb(0 0 0) scrim with the host --color-base-*
ramp: a washed-out color-mix backdrop (blur + desaturate) with an
@starting-style entrance transition, the close button restyled on the
same ramp as the zoom button, and the cloned SVG wrapped in an opaque
theme-surface panel so the diagram reads solid against the blur.
Dark mode keys off [data-theme="dark"], matching the Beck SVG.
@github-actions

Copy link
Copy Markdown

🛰️ Docs preview: https://pr-68.pennington-dev.pages.dev

Rebuilt on every push to this PR; torn down when it closes.

@phil-scott-78
phil-scott-78 merged commit 345caf8 into main Jul 10, 2026
4 checks passed
@phil-scott-78
phil-scott-78 deleted the beck-lightbox-theme branch July 10, 2026 15:25
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