Open Bug 1620344 Opened 4 years ago Updated 2 months ago

form fields have black/dark text in HCM mode (even with `color:inherit`), making them unreadable in dark HCM themes if they're styled with `background-color:transparent`

Categories

(Core :: Layout: Form Controls, defect, P3)

defect

Tracking

()

Tracking Status
firefox75 --- affected

People

(Reporter: dholbert, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(5 files)

STR with a testcase:

(1) Activate HCM, with a light foreground and dark background color.
(a) visit about:preferences, search for "color", click "Colors..."
(b) In the resulting dialog, use the color-pickers for 'Text' and 'Background' to choose light-on-dark, and then choose "Override the colors:...Always" in the dropdown at the bottom.

(2) View the attached testcase.

EXPECTED RESULTS: Text in the forms should be readable.
ACTUAL RESULTS: Text in the input field is not readable (it's black or darkgray, on a dark background, instead of being my chosen [and attempted-to-explicitly-inherit] foreground color).

STR "in the wild" in Firefox's own UI:

(1) Activate HCM, with a light foreground and dark background color.
(2) In Firefox Preferences (about:preferences), type anything into the search box at the top right.

(There are at least two other similarly-affected searchboxes: in the "Applications" section ("Choose how Nightly handles the files you download"), and in the dialog for "Manage cookies and Site Data")

EXPECTED RESULTS: Text in the search field should be readable.
ACTUAL RESULTS: Text in the input field is not readable (it's black, and hence not readable on a dark background).

(Note that the search box in the Firefox preferences has background-color: transparent; color: inherit, from our textbox.css theme file ([here's that file for linux)[https://searchfox.org/mozilla-central/rev/13b081a62d3f3e3e3120f95564529257b0bf451c/toolkit/themes/linux/global/textbox.css#24,29-30], and there are versions for Win/Mac as well).

If this bug turns out to be complex to fix, we might want to change our theming (or preferences code) to get rid of that background:transparent styling.

Attached file testcase 1
Blocks: 1536616

Is this a recent regression?

Flags: needinfo?(dholbert)

In particular, is this a regression from bug 1619701? :)

I don't think so. I can reproduce it in Firefox release (73.0.1).

The attached testcase does look a bit different there -- in particular, all the elements have their normal background (they aren't transparent), and the <select> element is readable. But all the other fields seem to have backplate behind their textual contents, which makes it unreadable (and which goes away and makes things readable if I remove the background: transparent styling).

Flags: needinfo?(dholbert)

To clarify, this is only a problem for widgets that have background: transparent (or more specifically, background-color:transparent)

In the absence of that styling, the widgets render with their own normal background-color (independent of the HCM theme colors), which is typically an appropriate color for their text to be visible on top of.

Summary: form fields have black/dark text in HCM mode (even with `color:inherit`), making them unreadable in dark HCM themes → form fields have black/dark text in HCM mode (even with `color:inherit`), making them unreadable in dark HCM themes if they're styled with `background-color:transparent`

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

Nope bugbug, this is not known to be a regression.

(As a sanity-check, I tested a >4yo build from 2016-01-01 and I can reproduce there as well. See attached screenshot.)

Keywords: regression
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: