Skip to content

Dark theme not working on login page #15326

@kinglouie

Description

@kinglouie

Describe the Bug.

When using theme: 'all' (the default) in the admin config, the login page always renders with the light theme even when the user's system is set to dark mode. After logging in, the dark theme works correctly on all other admin pages.

Reproduction Steps

  1. Set up Payload with default theme settings (or explicitly set admin.theme: 'all')
  2. Set your system to dark mode
  3. Visit the login page
  4. Observe that the login page shows light theme
  5. Log in
  6. Observe that authenticated pages correctly show dark theme

Environment Info

Binaries:
  Node: 22.22.0
  npm: 10.9.4
  Yarn: 1.22.19
  pnpm: 9.15.4
Relevant Packages:
  payload: 3.72.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020
  Available memory (MB): 16384
  Available CPU cores: 10

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions