Skip to content

fix(og): give the share card's text its own surface - #810

Open
smmariquit wants to merge 1 commit into
stagingfrom
fix/og-text-contrast
Open

fix(og): give the share card's text its own surface#810
smmariquit wants to merge 1 commit into
stagingfrom
fix/og-text-contrast

Conversation

@smmariquit

Copy link
Copy Markdown
Collaborator

Reported: text on the share card does not contrast properly.

Cause

The background photo has near-white "UP LOS BAÑOS" concrete lettering sitting exactly where the title renders, so white title text landed on a near-white background. The existing flat rgba(28, 8, 7, 0.48) tint dims the whole image uniformly, which cannot rescue a spot that bright, and the title's soft shadow was not enough either.

What I tried first, and why it failed

A bottom-weighted gradient scrim, which is the usual fix. Satori does not reliably honour backgroundImage gradients, so the card rendered visually unchanged twice. Only rendering the real endpoint caught this; the CSS looked correct.

Fix

The title and subtitle now sit on their own solid panel (rgba(24, 7, 6, 0.82), rounded, padded). White on that is roughly 13:1 regardless of the photo behind it, and it keeps working if the background image is ever swapped per building.

The overall tint drops back to 0.42 since the panel now carries the contrast.

Verified

Rendered the real route with the exact reported content (t=PSLH A, subtitle Physical Sciences Building · 5 classes · AY 2025-2026 Midyear, kicker Room at UPLB) at each step. Before: title illegible over the concrete letters. After: both lines clearly readable. Badge and kicker unchanged.

bun run build:e2e green, biome clean.

The campus photo has near-white 'UP LOS BAÑOS' lettering exactly where
the title renders, so white-on-white happened whatever the text shadow
did. A flat tint over the whole image cannot fix that, and a bottom
gradient silently does nothing: satori does not reliably honour
backgroundImage gradients, so two attempts rendered unchanged.

Put the title and subtitle on their own dark panel instead. White on
it is about 13:1 no matter what the photo does.
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
saan-ang-room Ready Ready Preview, Comment Jul 27, 2026 1:35am

Request Review

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