XF 2.3 Dark mode is driving me nuts - I don't get it

smallwheels

Well-known member
Licensed customer
When upgrading from 2.2 to 2.3.8 (now 2.3.10) a bit over a month ago I tested dark mode on my test system, ran into issues and decided not to bother with it for the moment and look into it later. Later is now and I do not get the problem.

In principle it works as it should apart from two killer issues:

1.) when I enable variations to enable dark mode...
Bildschirm­foto 2026-03-16 um 00.36.04.webp
... my header graphic is not displayed any more, neither in bright nor in dark mode. Instead there is a broken image. When I check the URL for the logo it looks like this:

Code:
https://myforumurl/var(--xf-publicLogoUrl)

if I switch off variations the URL looks like that...

Code:
https://myforumurl/data/assets/logo/logo-small_192.png

and works like a charm (as it has always done). The logo is there and should work - but for some unknown reason the URL does not get rendered correctly when turning on variations.

2. Also, I do miss the button to switch between modes near the language selector.

I do run a custom style that I set up as child of the XF default style. The only difference is that I changed some colors, mainly the background color and obviously the logo. When I use the default style instead everything works flawlessly: The option to switch is there as is the XF logo in the header. But it does get even more weird: On my test system it did not work before but does work now for unknown reasons: The Logo is there, the switch is there and switching between light and dark works flawlessly. I am not aware that I would have changed anything to make this happen.

Assuming the fact that I run a child theme might be the issue, to test further, I did create a new style that is not a child of the default style by exporting both, the default style and my child style and importing them into a new one on the highest hierarchy level, first the default style and then overwriting it with my style - and ended up with the same issues.

Any idea what might cause the issues?
 
I think I fixed it - it seems to work now. I created a new style (which is identical to the XF default) and copied over the changes that I did for my forum. As said before those were and are quite minimal:

• individual logo/icon instead of the XF one
• a few (very few) small color changes in the area of "basic colors" (in the areas "Chrome", "Heading" and "Block Tab Header")

In total nothing that should cause the pretty drastic issues that I had with dark mode in my opinion. With the fresh theme I started wit style variations applied already (which obviously was not possible when I created my style derivate initially in 2.2.) and possibly this did the trick. I left the dark mode colors as they were set by XF (whereas before I had adopted them as well to my color scheme a bit) and only changed the ones for bright mode as I had them before along with my logo/icon. Now it works as it should. I don't know why and I also don't care too much.

So if anyone bumps into the same or a similar issue: Starting from fresh may solve the issues, despite it does not seem to make any sense or difference.
 
Back
Top Bottom