When changed to Dark theme, forms have black text on black background

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!
mocambo
Hobby Astronomer
Hobby Astronomer
Posts: 20
Joined: 2017-03-17, 23:03

When changed to Dark theme, forms have black text on black background

Unread post by mocambo » 2018-04-21, 03:06

Hi !

When changed theme to Maia Dark all form elements on Palemoon displayed black text on black background. In same time Firefox forms are readable.

How can it be fixed ?

Thank you !

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: When changed to Dark theme, forms have black text on black background

Unread post by Isengrim » 2018-04-21, 10:19

I'm not terribly knowledgeable about themes on Linux, but I know with the Mint Y Dark theme text coloring seems to render fine, so my guess is that it's an issue with the particular theme you're using.
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

mocambo
Hobby Astronomer
Hobby Astronomer
Posts: 20
Joined: 2017-03-17, 23:03

Re: When changed to Dark theme, forms have black text on black background

Unread post by mocambo » 2018-04-22, 00:31

Isengrim wrote:I'm not terribly knowledgeable about themes on Linux, but I know with the Mint Y Dark theme text coloring seems to render fine, so my guess is that it's an issue with the particular theme you're using.
Forms elements renders wrong also with Adwaita-Dark, official Xfce-dusk themes. These are very popular and well developed themes too. Same time in all cases Firefox shows white text on dark background as expected. Palemoon default theme is linked against Firefox default theme. Strange.

I use Manjaro Xfce.

Does anyone have experiences with that ?
Last edited by mocambo on 2018-04-22, 02:08, edited 1 time in total.

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: When changed to Dark theme, forms have black text on black background

Unread post by Walter Dnes » 2018-04-23, 04:56

I don't know if you'd accept a Pale Moon add on, leaving the rest of your desktop in standard mode. The Advanced Night Mode addon makes things easier on my eyes. It's at http://addons.palemoon.org/addon/advanced-night-mode/ Here's a screenshot.
Attachments
Adcanced Night Mode example
Adcanced Night Mode example
There's a right way
There's a wrong way
And then there's my way

mocambo
Hobby Astronomer
Hobby Astronomer
Posts: 20
Joined: 2017-03-17, 23:03

Re: When changed to Dark theme, forms have black text on black background

Unread post by mocambo » 2018-04-23, 23:01

Walter Dnes wrote:I don't know if you'd accept a Pale Moon add on, leaving the rest of your desktop in standard mode. The Advanced Night Mode addon makes things easier on my eyes. It's at http://addons.palemoon.org/addon/advanced-night-mode/ Here's a screenshot.
Thanks ! This addon is the one option.

Little investigated around - the dark theme problem in Palemoon is inherited from Firefox. Firefox (and now also Palemoon) seem to be the only browser which leaks system theme colors to web pages.

https://bugzilla.mozilla.org/show_bug.cgi?id=1283086

Lew Rockwell Fan

Re: When changed to Dark theme, forms have black text on black background

Unread post by Lew Rockwell Fan » 2018-05-09, 16:35

FWIW, I've tinkered with colors quite a bit, and overall I've had the best results by setting the desired colors in PM's native prefs and using a light-fg/dark-bg system theme in addition. I use the "Page Colors and Fonts Buttons" extension with the buttons placed on the menu bar for the occasional page I suspect of not displaying correctly. In the past I've had good results using stylish to tweak specific pages, but it doesn't seem to work anymore (which I just started a thread about).

Artemis3

Re: When changed to Dark theme, forms have black text on black background

Unread post by Artemis3 » 2018-05-13, 16:15

Actually it is the other way around. Firefox and derivatives have always respected the GTK theme, it is not a "leak" into the browser but an intended behavior.

The reason why some pages fail, is bad coding practice. Some web authors "assume" default colors, and don't define them. The No.1 mistake is assuming default fg is black and default bg is white. So often, they "forget" to define one.

The common mistake is an input dialog, if your theme is dark and calls for a dark background in the input dialog, but the web author failed to define proper fg and/or bg colors, it may result in black on black input boxes.

Chrome et al simply gave up to bad coding practices, and forcibly use black fg and white bg, which in turns breaks your desktop theme experience.

For example: If you don't define either color, it will probably look correctly white fg and black bg on firefox (when using a dark GTK theme), but black fg and white bg on chrome. But, if you are a lazy author and only defined the fg color as, say "dark gray", (because black isn't your thing), but didn't bother to define bg as well, you get the dreaded black on black.

Having dealt with this accessibly issue for years, i got in the habit of always having Stylish or one of its derivatives with various dark global styles ready.

Before you think Chrome did the right thing, think for a moment who the users of dark themes are. The least they want is some shiny thing blasting white to your poor eyes, ie. the url bar or the blank/home page. So you don't want white backgrounds burning your eyes in those input boxes either, like chromium rudely does.

I would love it if the browser had a "night mode", like Xombrero, where you "turn off the lights" by just pressing a key (s one tab, S all tabs), similar to this Advanced Night Mode addon, which only misses the key binding.

mocambo
Hobby Astronomer
Hobby Astronomer
Posts: 20
Joined: 2017-03-17, 23:03

Re: When changed to Dark theme, forms have black text on black background

Unread post by mocambo » 2018-08-07, 03:18

Ok, Artemis3, I've got your point and thank you for that. Things are much clearer now.

But what regular user can do now ? The problem for simple user still exists however we name it. I have retoric question - are the browsers made for standards (for developers) or for users ? As this kind of "bad coding practice" seem to be massive, therefore I think the solution could be somehow regulated by browser side - hardcoded into browser or in the form of add-on.

For now i'm a satisfied Advanced Night Mode user. But sometimes I still wake at the middle of night and remember that the problem still sits somehwere there in the browsers. ;)
Artemis3 wrote:Actually it is the other way around. Firefox and derivatives have always respected the GTK theme, it is not a "leak" into the browser but an intended behavior.
Last edited by mocambo on 2018-08-07, 03:18, edited 1 time in total.

Mercury

Re: When changed to Dark theme, forms have black text on black background

Unread post by Mercury » 2018-08-07, 06:01

I use a dark classic theme on Windows and ran into similar problems. I'm not sure if this will be a complete fix for your Linux issues, but you can use acustom userContent.css file to set color defaults for pages that make stupid assumptions. I'll paste mine below. I haven't touched it in years and it works almost everywhere.

Code: Select all

body:not([bgcolor]):not([background]) { background-color: #FFFFFF; -moz-appearance: none;}

body:not([text]) { color: #000000; }

textarea, input, select, *[cols] {
	color: #000000;
	background: #FFFFFF;
	background-color: #FFFFFF;
	border-top-color: #FFFFFF;
	border-left-color: #FFFFFF;
	border-bottom-color: #404040;
	border-right-color: #404040;
	-moz-appearance: none;
}
input[type="submit"], input[type="button"], input[type="reset"], button {
	color: #000000;
	background-color: #D4D0C8;
	border-top-color: #ffffff;
	border-left-color: #ffffff;
	border-bottom-color: #404040;
	border-right-color: #404040;
	border-style: outset;
	border-width: 1;
	-moz-appearance: none;
}
input[type="radio"] {
	-moz-appearance: none;
}
input[type="checkbox"] {
	color: #000000;
	background-color: #D4D0C8;
	border-bottom-color: #ffffff;
	border-right-color: #ffffff;
	border-top-color: #404040;
	border-left-color: #404040;
	border-style: inset;
	border-width: 1;
	-moz-appearance: none;
}
This gives classic Windows colors, mostly. Advanced Night Mode can be used on top.
Last edited by Mercury on 2018-08-07, 06:01, edited 1 time in total.

User avatar
Gordon Dry
Fanatic
Fanatic
Posts: 121
Joined: 2014-10-14, 19:54
Location: Germany

Re: When changed to Dark theme, forms have black text on black background

Unread post by Gordon Dry » 2018-08-23, 00:46

I have this problem with selected text in forms and marked text in every theme incl. the default one.
Text is black, selection is black...

When I enable "Advanced Night Mode" then marked text is okay, selected text in forms is still black on black.

This is since I upgraded Pale Moon to 28.0.0

How the heck do I solve this?
Last edited by Gordon Dry on 2018-08-23, 00:49, edited 1 time in total.

Lew Rockwell Fan

Re: When changed to Dark theme, forms have black text on black background

Unread post by Lew Rockwell Fan » 2018-08-25, 11:19

It is also possible, at least in Openbox under Ubuntu (more or less a lighter version of Lubuntu) to assign specific themes to specific programs. I've done this but I don't recall the details off the cuff. I seem to remember modifying some config files and creating a new directory. So if you want to run Ambiance on most things, but Cleanice on PM, and Crux on thunar, you can. Duckduckgo can tell you all the details.

User avatar
Gordon Dry
Fanatic
Fanatic
Posts: 121
Joined: 2014-10-14, 19:54
Location: Germany

Re: When changed to Dark theme, forms have black text on black background

Unread post by Gordon Dry » 2018-09-20, 13:18

Just tried PM 28.1.0 to see if this is fixed - nope.

Have to go back to 27.9.4 again.

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

Re: When changed to Dark theme, forms have black text on black background

Unread post by Moonchild » 2018-09-20, 14:02

Gordon Dry wrote:Just tried PM 28.1.0 to see if this is fixed - nope.

Have to go back to 27.9.4 again.
Unless some clear report is made about what exactly the problem is in which circumstances, exactly, there is nothing to work on, and nothing to "magically be fixed". Just because there's a new release doesn't suddenly means something that was not worked on resolves itself.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

fillerup

Re: When changed to Dark theme, forms have black text on black background

Unread post by fillerup » 2018-09-20, 17:16

i can confirm that on Linux, when opening PM by double clicking the executable, it picks up my current GTK theme (or Qt, not sure, i'm on KDE) and tries to apply it, to disastrous result. opening PM through terminal and everything is fine again

Lew Rockwell Fan

Re: When changed to Dark theme, forms have black text on black background

Unread post by Lew Rockwell Fan » 2018-10-04, 07:20

Since I posted in this thread in May, I've experimented with Stylem quite a bit. It's great. Make that Tony-the-Tiger GRRREEEEEAAAT! I'm picky about this sort of thing and I've been editing themes. What's working well for me is a single dark global theme with additional site specific themes for the sites that don't work well with the global theme. It would be easier to use if the themes allowed exclude lists, but with a little tinkering you can make it work pretty darn well.

Locked