Dark mode toggle resets after navigating between spaces

[deleted] 2 months ago

When I enable dark mode and then click into a different space, the page loads in light mode for a split second before switching back. On slower connections it stays light.

Looks like the preference isn't applied before first paint.

18
[deleted] OP

For what it is worth, the same approach works with the PMPro adapter — the membership side is identical from here.

[deleted] OP

Thanks for writing this up. Bookmarking it — the kind of thing I will want to reference again in a month.

[deleted] OP

I respectfully disagree on one detail. In my setup the opposite held true, though I suspect it comes down to community size.

[deleted] OP

For what it is worth, the same approach works with the PMPro adapter — the membership side is identical from here.

[deleted] OP

This is the answer I wish I had found six months ago. Would have saved me a weekend of trial and error.

Click Any Link Below To Find Out More

This will close in 0 seconds