[pmwiki-users] Is there an easy way to remove the icon "Toggle dark theme" at the top of the page?

Christopher Pinon cjpinon at versioning.org
Sun Jul 6 13:33:23 PDT 2025


Petko Yotov <5ko at 5ko.fr> writes:

> On 06/07/2025 21:38, Christopher Pinon wrote:
>> A quick question: is there an easy way to remove the icon "Toggle dark
>> theme" at the top of the page of the (default) skin PmWiki-responsive?
>
> Yes, you can add this to pub/css/local.css:
>
>    #wikihead .pmToggleDarkTheme {
>      display: none;
>    }

Great, thanks -- I was afraid that I would need to go more low-level! :-)

> If the file doesn't exist, create it.

In fact, as it happens, I was experimenting with local.css based on your
suggestion

/* Change backgrounds from light gray to light green: */
#bodywrap, #wikileft, #wikihead-searchform, #wikicmds, .frame {
  background-color: #dfd;
  }

from https://www.pmwiki.org/wiki/Skins/PmWiki-responsive , which looks
nice as a light color theme but doesn't work when switching to the
default dark color theme.

Ideally, I would like to keep the toggle between light color and dark
color, but I would first need to adapt the default dark color theme to
my light color theme.

>> I know about
>> 
>> $EnableDarkThemeToggle = 0;
>> 
>> but this still leaves the (no longer functional) icon visible.
>
> Oh, we should indeed remove this, let me think about it.

Right, if I may say so, whereas the other three values (1, 2, 3) for
this feature make good practical sense, if one wants to disable this
feature, then it's better to simply hide/remove the icon using your
suggestion above instead of setting the value 0. (At least under normal
circumstances.)

Thanks for your efforts,
C.



More information about the pmwiki-users mailing list