Skip to content

Add support for light mode - #85

Open
troccoli wants to merge 26 commits into
pestphp:5.xfrom
troccoli:add-light-mode
Open

Add support for light mode#85
troccoli wants to merge 26 commits into
pestphp:5.xfrom
troccoli:add-light-mode

Conversation

@troccoli

@troccoli troccoli commented Aug 6, 2026

Copy link
Copy Markdown

This PR adds a theme switcher and supports for light mode. The default is still dark mode though. It has been done with the help of Codex AI.

  • CSS variables have been added for both dark and light mode and used throughout.

  • The logos in the Community section on the homepage have been left unaltered, as I would have had to research each company to understand how to correctly display their logo in light mode.

  • By default the syntax highlight themes are dracula for dark mode and github-light for light mode. They can be customised by the TORCHLIGHT_DARK_THEME and TORCHLIGHT_LIGHT_THEME env variables.

For reference I have attached the plan I and Codex followed and the audit file used during the plan.

LIGHT_MODE_PLAN.md
LIGHT_MODE_AUDIT.md

Questions for the reviewer(s)

  1. I have converted the homepage too, but I can revert that back if you prefer. I am interested mainly in the documentation part of the site.
  2. I have used CSS variables as I said above, instead of the
    dark: class modifier. If you prefer using the Tailwind classes directly I can have a go at converting something like bg-[var(--theme-bg)] to bg-white dark:bg-zinc-900
  3. I have taken the liberty to add my name to the footer. Let me know if that's ok

@troccoli
troccoli marked this pull request as draft August 8, 2026 11:26
@troccoli
troccoli marked this pull request as ready for review August 8, 2026 15:39
@troccoli

Copy link
Copy Markdown
Author

Is anybody available for a review?

@nunomaduro

Copy link
Copy Markdown
Member

@nunowar

@nunowar

nunowar commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

It needs some improvements. I'll make them and merge soon. Thanks!

@troccoli

Copy link
Copy Markdown
Author

Of course. I used Codex so that's natural. I look forward to see your changes. And thanks again

@nunomaduro

Copy link
Copy Markdown
Member

@nunowar why do we need light mode tho?

@nunowar

nunowar commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

@nunowar why do we need light mode tho?

That's a good question. Personally, I don't miss this feature, but some people prefer reading in light mode, especially on documentation pages. We can add it soon, but I want to do it properly and keep the PEST brand strong and consistent across both modes...

@troccoli

Copy link
Copy Markdown
Author

Because there are a lot of people, like me, who find it very hard to read in dark mode. I personally cannot look at a dark mode site for more than 30 seconds before my eyes get blurry.

@troccoli

troccoli commented Aug 20, 2026

Copy link
Copy Markdown
Author

It's about usability. The same reason we have keyboard shortcuts, add alt text, and use aria attributed.

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.

3 participants