Fix field contrast with GTK dark theme

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
sunchild
Moongazer
Moongazer
Posts: 8
Joined: 2022-12-21, 23:08

Fix field contrast with GTK dark theme

Unread post by sunchild » 2025-03-07, 08:24

Operating system: Arch Linux (6.13.5)
Browser version: 33.6.0.1 (64-bit) (GTK2)
Browser theme (if not default): Dark Moon 2.7.2
GTK theme: yaru-magenta-dark

Is there any fix for the input fields having no contrast when using a dark GTK theme ?
I read a few posts that suggested fixing it with a user style:
https://userstyles.org/styles/111694/gt ... obal-fixes
https://userstyles.org/styles/129092/wh ... -field-fix

Unironically, https://userstyles.org/ does not even load for me. I get the following even after disabling ublock:
Application error: a client-side exception has occurred (see the browser console for more information).
I get the same error when I tried opening the link with firefox. The link opens fine on chromium clones but when I click on SHOW CSS all I get is {}.

I'm not sure if this thread belongs on Web Compatibility Support. Can somebody who has the CSS for the these styles share them ?

gabrgv
Moonbather
Moonbather
Posts: 53
Joined: 2023-10-28, 18:59

Re: Fix field contrast with GTK dark theme

Unread post by gabrgv » 2025-03-07, 13:29

http://userstyles.org is a Chrome-only thing now I guess; use https://uso.kkx.one instead, which is a mirror of the old userstyles.org

Here:
https://uso.kkx.one/style/129092
or
https://uso.kkx.one/style/161920

Goodydino
Keeps coming back
Keeps coming back
Posts: 882
Joined: 2017-10-10, 21:20

Re: Fix field contrast with GTK dark theme

Unread post by Goodydino » 2025-03-07, 20:14

Excuse my ignorance, but why would anyone want the text to be the same colour as the background? There would be no way to read it.

User avatar
sunchild
Moongazer
Moongazer
Posts: 8
Joined: 2022-12-21, 23:08

Re: Fix field contrast with GTK dark theme

Unread post by sunchild » 2025-03-08, 14:50

gabrgv wrote:
2025-03-07, 13:29
use https://uso.kkx.one instead
Thanks for the mirror. But it looks like the CSS is the same as the one that I came up with. It fixes many websites while breaking others like redlib instances. I guess I'll just stick to a light theme for now. I tried launching it with GTK_THEME but it still uses the global dark theme.

Code: Select all

GTK_THEME=Yaru-olive palemoon
Goodydino wrote:
2025-03-07, 20:14
Excuse my ignorance, but why would anyone want the text to be the same colour as the background? There would be no way to read it.
I believe its a bug #519763 inherited from firefox.

gabrgv
Moonbather
Moonbather
Posts: 53
Joined: 2023-10-28, 18:59

Re: Fix field contrast with GTK dark theme

Unread post by gabrgv » 2025-03-08, 16:16

sunchild wrote:
2025-03-08, 14:50
I tried launching it with GTK_THEME
I think this will only work with GTK3. For GTK2 you can try setting the GTK2_RC_FILES to point to a gtkrc file with a light theme, and launch like this:

Code: Select all

GTK2_RC_FILES=~/.config/gtk-2.0/gtkrc-light palemoon

User avatar
sunchild
Moongazer
Moongazer
Posts: 8
Joined: 2022-12-21, 23:08

Re: Fix field contrast with GTK dark theme

Unread post by sunchild » 2025-03-08, 21:55

That works :D

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37350
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Fix field contrast with GTK dark theme

Unread post by Moonchild » 2025-03-09, 09:29

I briefly looked into this and Mozilla is effectively doing the same thing as that, with the difference that they lean heavily on forcing a light theme on content-processes only through electrolysis, while enforcing their own styling on the UI, ignoring system styles. That is obviously not something we could do.
"The world will not be destroyed by those who do evil, but by those who watch them without doing anything." - Albert Einstein
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite