Dark mode for .html help pages

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Torf
User
User
Posts: 13
Joined: Thu Apr 27, 2023 8:03 pm

Dark mode for .html help pages

Post by Torf »

I like to work in PB with the tool 'help' into de IDE, but this does not support the dark mode (and I like to work using dark mode, too :))

Would be a problem include an 'auto mode' in html pages of the 'help tool'?

An example in css:

Code: Select all

/* Dark-mode */
    body {
        background-color: black;
        color: white;
    }
/* Light-mode */
@media (prefers-color-scheme: light) {
    body {
        background-color: white;
        color: black;
    }
}
I suppose that html published in web also could be use it.

Excuse me if this point was discussed already, I didn't find in forum.

Thanks in advance.
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Dark mode for .html help pages

Post by RSBasic »

+1
I also use DarkMode. (forums, PB IDE, many websites, smartphone apps, ...)
Image
Image
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Dark mode for .html help pages

Post by RSBasic »

Torf wrote: Thu Oct 12, 2023 8:42 am

Code: Select all

@media (prefers-color-scheme: light) {
CHM is based on old Internet Explorer and prefers-color-scheme is not supported: https://caniuse.com/?search=prefers-color-scheme
Image
Image
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: Dark mode for .html help pages

Post by AZJIO »

RSBasic wrote: Thu Oct 12, 2023 4:17 pm
Torf wrote: Thu Oct 12, 2023 8:42 am

Code: Select all

@media (prefers-color-scheme: light) {
CHM is based on old Internet Explorer and prefers-color-scheme is not supported: https://caniuse.com/?search=prefers-color-scheme
CHM supports css and javascript. I added support for an external css file to the help file, but to do this I had to handle the help pages by replacing explicit colors with classes. There is also a way to save css selections via cookies.
Post Reply