Selection is unreadable with dark theme
Categories
(DevTools :: JSON Viewer, defect, P3)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: fvsch, Assigned: fvsch)
Details
(Whiteboard: [good first verify])
Attachments
(3 files)
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Attaching a screenshot from MacOS.
Selected text is not white -> it should be.
Honza
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
It looks like the JSON viewer is not loading light-theme.css
or dark-theme.css
(which load variables.css, common.css and a few others), but loads variables.css and common.css directly.
The light|dark-theme.css stylesheet have a lot of duplicated rules, including:
::-moz-selection {
background-color: var(--theme-selection-background);
color: var(--theme-selection-color);
}
This could probably be moved to common.css (and the selector can be changed to just ::selection
now that it's unprefixed).
That fix would still need testing on different platforms. Currently on Linux I'm getting good results and with white text on dark blue for selections, which switches to dark blue text on white on a selected row. Not sure if that is happening because of existing CSS, or (more likely) the automatic selection color that Gecko uses on Linux (and possibly on Windows too?), which differs from the selection color handling on macOS.
Assignee | ||
Comment 6•6 years ago
|
||
We may need something like:
/* devtools/client/themes/common.css */
::selection {
background-color: var(--theme-selection-background);
color: var(--theme-selection-color);
}
/* devtools/client/shared/components/tree/TreeView.css */
/* invert selection colors in a selected row */
.treeRow.selected ::selection {
background-color: var(--theme-selection-color);
color: var(--theme-selection-background);
}
Comment 7•6 years ago
|
||
@Florens: can you please attach a patch? I can test on Windows and Mac
Honza
Assignee | ||
Comment 8•6 years ago
|
||
Sure, I'll try to have one ready during the week.
(Keeping the needinfo to bug myself. :P)
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 10•6 years ago
|
||
The patch above moves the basic ::selection
styles to common.css
, and adds "inverted colors" selection styles for:
shared/components/tree/TreeView.css
(JSON view, Network panels, Accessibility primary panel)debugger/packages/devtools-components/src/tree.css
(used in Console and Debugger, it seems)- Plus a custom style for Accessibility's sidebar because it seems to put the
"focused"
class on a different element than whattree.css
expects.
Assignee | ||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•