Notifications
Clear all

Dark mode switcher

1 Posts
1 Users
0 Reactions
11 Views
Posts: 36
Topic starter
(@golabs)
Trusted Member
Joined: 4 years ago

I'm looking for a way to let wpForo theme react to the theme switcher of my theme. I'm using Blocksy but that is not overly relevant for the question I have.

When switching between the light and dark theme on the frontend, Blocksy updates <html> element from data-color-mode="light" to data-color-mode="dark" (or vice versa).

I can of course sync that statement into the <body> element with some basic JS.

Does anyone know if wpForo can response, theme wise, to a class change to switch between light (regular) and dark theme?
If so, is wpForo using darkmode as classname or something else?
And does it need to be a class of the <body> element, or another element?

Thanks in advance for your help.