Dark mode toggle resets after navigating between spaces

Aisha Khan Aisha Khan 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.

0

Great point. I had not considered the angle you raised in the second paragraph — it reframes the whole thing for me.

We ran into the same situation last quarter. What worked for us was starting small and only adding complexity when a real need showed up.

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

Tried this on a staging copy first and it behaved exactly as described. Confident enough to roll it to production now.

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

Your Order

No products in the cart.