Skip to content

Conversation

@lacatoire
Copy link

@lacatoire lacatoire commented Feb 10, 2026

Summary

  • Enables the theme switcher button globally by removing the $config['theme_switcher'] gate in header.inc
  • Adds comprehensive html.dark CSS overrides in theme-medium.css covering all content areas: layout, links, headings, tables, code blocks, syntax highlighting, notes/warnings/tips, user notes, breadcrumbs, sidebar, forms, thanks cards, and more

Closes #1295

Approach

  • Pure CSS, no build step needed
  • Uses html.dark selector matching the existing JS toggle (common.js)
  • Overrides :root semantic CSS variables first, then targeted overrides for hardcoded hex values
  • PHP brand colors (blue/magenta) adjusted for dark backgrounds
  • WCAG contrast maintained
  • Light mode remains the default
  • Navbar and search modal already use dark colors — no changes needed

Enable the theme switcher globally and add CSS dark mode rules.

- Remove $config['theme_switcher'] gate so the toggle button appears on all pages
- Add html.dark overrides in theme-medium.css for all content areas
@github-actions
Copy link
Contributor

🚀 Preview for commit 6269528 can be found at https://web-php-pr-1815.preview.thephp.foundation

@github-actions
Copy link
Contributor

🚀 Regression report for commit 6269528 is at https://web-php-regression-report-pr-1815.preview.thephp.foundation

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dark mode website

2 participants