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

Petko Yotov 5ko at 5ko.fr
Sun Jul 6 14:30:30 PDT 2025


On 06/07/2025 22:33, Christopher Pinon wrote:
> Petko Yotov <5ko at 5ko.fr> writes:
> 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.

It is now easier to change the colors, as these are just variables.

In local.css instead of #bodywrap... above, this may get you started:

   :root {
     --pm-frame-bgcolor: #dfd;
     --pm-bgcolor: #efe;
   }

   @media screen {
     html.pmDarkTheme {
       --pm-frame-bgcolor: #232;
       --pm-bgcolor: #121;
     }
   }

Check the variable names and values in 
pmwiki/pub/skins/pmwiki-responsive/skin.css, top (light) and bottom 
(dark). Normally don't modify that file, redefine these in local.css and 
yours will apply.

Configuring the dark colors may be tricky and subjective. :-)

Petko



More information about the pmwiki-users mailing list