Page 1 of 1

Dark mode for .html help pages

Posted: Thu Oct 12, 2023 8:42 am
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.

Re: Dark mode for .html help pages

Posted: Thu Oct 12, 2023 12:38 pm
by RSBasic
+1
I also use DarkMode. (forums, PB IDE, many websites, smartphone apps, ...)

Re: Dark mode for .html help pages

Posted: Thu Oct 12, 2023 4:17 pm
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

Re: Dark mode for .html help pages

Posted: Thu Oct 12, 2023 4:23 pm
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.