Skip to content

fix(dark-mode): article-card body stays white#98

Open
dosteinacher wants to merge 1 commit into
mainfrom
fix/dark-mode-article-cards
Open

fix(dark-mode): article-card body stays white#98
dosteinacher wants to merge 1 commit into
mainfrom
fix/dark-mode-article-cards

Conversation

@dosteinacher

@dosteinacher dosteinacher commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • .article-card .article-card-body hardcodes background: var(--color-white) in lazy-styles.css, so when the OS prefers dark mode, the outer .article-card flips to #1e1e1e but the inner body stays white. The h3 inside then inherits --body-color (#e8e8e8 in dark mode) — light text on white, unreadable.
  • Mirrors the existing .article-card dark-mode override onto .article-card-body so the title sits on its intended dark surface.
  • Also bumps the hover shadow opacity — rgb(0 0 0 / 12%) is invisible on a dark background.

Light mode is unchanged. Change is fully contained inside the existing @media (prefers-color-scheme: dark) block in styles/styles.css.

Test plan

  • On a blog listing page (e.g. /, a tag page), toggle macOS / browser dark mode → titles + descriptions readable inside cards
  • Toggle back to light mode → no visual diff
  • Hover state on a card in dark mode is still felt

🤖 Generated with Claude Code

Preview

  • Dark mode test (toggle macOS/browser dark mode): Blog index · AI tag page
  • Light mode regression check: same URLs with system theme set to Light → cards look identical to production.

Branch preview host: fix-dark-mode-article-cards--inside-aem--adobe.aem.page

`.article-card .article-card-body` hardcodes `background: var(--color-white)`
in lazy-styles.css, so when the OS prefers dark mode and styles.css flips
the outer `.article-card` to #1e1e1e, the inner body stays white. The h3
inside then inherits the now-light `--body-color` (#e8e8e8) — light text on
white, unreadable on the listing page.

Mirror the outer-card override on `.article-card-body` so the title sits on
its intended dark surface, and bump the hover shadow opacity (the default
12% black is invisible on dark) so the hover feedback still reads.

Light mode is unchanged — this is added inside the existing
`@media (prefers-color-scheme: dark)` block.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Jun 9, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Jun 9, 2026

Copy link
Copy Markdown
Page Scores Audits
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS
📱 /en/topics/ai PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS
🖥️ /en/topics/ai PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS

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