AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Solved] Dark mode switcher

2 Posts
2 Users
0 Reactions
1,022 Views
Posts: 47
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@golabs)
Trusted Member
Joined: 5 years ago
[#61745]

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: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 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.


Share: