Re: Is there an easy way to remove the icon "Toggle dark theme" at the top of the page?

Christopher Pinon <[email protected]> Sun, 06 Jul 2025 22:12:47 +0000
Newsgroups gmane.comp.web.wiki.pmwiki.user
Message-ID <87ms9hj7ds.fsf@localhost>
Petko Yotov <[email protected]> writes:

> On 06/07/2025 22:33, Christopher Pinon wrote:
>> Petko Yotov <[email protected]> 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.

Thanks for the tip! Indeed, such variables make the task more high-level
and thus easier. I'll take a closer look.

C.