Firefox uses a different 'windowtext' color differs from Chrome (making e.g. MS OneDrive Word docs appear darker/easier-to-read in Chrome)
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: dholbert, Assigned: emilio)
References
Details
Attachments
(2 files)
STR:
- Load attached testcase.
- Click the text and see what the alert says.
ACTUAL RESULTS:
Firefox reports rgb(61, 61, 61)
i.e. a grayish color.
EXPECTED RESULTS:
Chrome reports rgb(0, 0, 0)
i.e. black.
I suspect that strictly speaking this is a UA-defined color and we use whatever color we deem appropriate (or maybe we get it from the OS? Though I'd expect that Firefox and Chrome would get the same color in that case...)
This causes Firefox to look noticeably "fainter" than Chromium-based browsers on OneDrive's Word Document Editor (which seems to use color: windowtext
by default).
Screenshot with Firefox on the left, Chrome on the right:
https://bugzilla.mozilla.org/attachment.cgi?id=9280762
(I originally posted this on bug 1773699 but then realized that I was seeing a different issue than the reporter; hence, I'm spinning this bug here off for the issue that I'm seeing.)
I'm using Ubuntu 22.04, FWIW.
Reporter | ||
Comment 1•2 years ago
|
||
Reporter | ||
Comment 2•2 years ago
|
||
FWIW in Firefox on Windows 10 (which I just tested via BrowserStack), it looks like we do indeed use rgb(0,0,0) -- i.e. I get "expected results" there.
But in Firefox Nightly on MacOS, I get rgba(0, 0, 0, 0.847)
-- i.e. partially-transparent black. I imagine this color (much like the opaque gray color that I'm getting on Ubuntu) is harder-to-see than regular black on MS Word documents viewed in OneDrive...
emilio, do you know offhand where this windowtext
system-color value comes from?
Reporter | ||
Updated•2 years ago
|
Comment 3•2 years ago
|
||
I am the one who reported the original bug. Your test case reports windowtext
as rgb(46, 52, 54)
. I'm in Fedora linux 36 KDE
Assignee | ||
Comment 5•2 years ago
|
||
They are using the window
/ windowtext
color correctly at least. We could make them match the Windows colors, but I'm not sure it's worth it.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 7•2 years ago
|
||
So I'm not sure comment 6 is a great idea, but it should help for this specific case.
Comment 8•2 years ago
|
||
could we do a specific page fix? Spoof window color only in Microsoft Office?
Assignee | ||
Comment 9•2 years ago
|
||
We could, but adding site-specific hacks is not a great use of time IMO. We could try to ping Microsoft folks to see if they can fix their page.
Also, I guess the spec says that Window/WindowText should be just Canvas/CanvasText, which this patch would achieve: https://drafts.csswg.org/css-color-4/#window
Comment 10•2 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/26d5615493b5 Spoof window/windowtext colors in content. r=dholbert
Comment 11•2 years ago
|
||
bugherder |
Description
•