Notifications
Clear all

[Solved] Dark mode switcher

2 Posts
2 Users
0 Reactions
160 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.

Topic Tags
1 Reply
Sofy
Posts: 4963
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi,

You can try achieving this with CSS code. Apply a transparent background for wpForo in dark mode. If necessary, fix any small issues using additional CSS code.