Skip to content

Make shimmer gradient theme-aware and semi-transparent in dark mode#24

Open
sinansays wants to merge 2 commits into
mainfrom
codex/fix-dark-mode-shimmer-effect
Open

Make shimmer gradient theme-aware and semi-transparent in dark mode#24
sinansays wants to merge 2 commits into
mainfrom
codex/fix-dark-mode-shimmer-effect

Conversation

@sinansays

Copy link
Copy Markdown
Owner

Motivation

  • Dark-mode shimmer was rendering as an opaque bright rectangle instead of a subtle highlight on text lines.
  • The shimmer needed to be alpha-based (semi-transparent) rather than a solid white block.
  • The effect should automatically adapt to both light and dark themes using shared settings.
  • Reuse theme configuration so shimmer intensity scales consistently across themes.

Description

  • Extended the theme object in thinking-gif/lib.js to include a shimmer config with r,g,b,minAlpha,maxAlpha per theme.
  • Replaced fixed white gradient stops with an rgba(...) gradient derived from theme.shimmer values.
  • Compute shimmerAlpha from shimmerIntensity and the theme alpha range to produce a subtle highlight in dark mode.
  • Change is localized to thinking-gif/lib.js and preserves the existing per-line clipping and source-atop composite logic.

Testing

  • No automated tests were run for this change.

Codex Task

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 29, 2025

Copy link
Copy Markdown

Deploying sinan-io with  Cloudflare Pages  Cloudflare Pages

Latest commit: 45a37cb
Status: ✅  Deploy successful!
Preview URL: https://59a22d89.sinan-io.pages.dev
Branch Preview URL: https://codex-fix-dark-mode-shimmer.sinan-io.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant