Skip to content

Commit

Permalink
Bug 1913053 - Use the sidebar text color along with the fallback back…
Browse files Browse the repository at this point in the history
…ground on selected rows for themes not setting highlight colors. r=nsharpley,emilio,desktop-theme-reviewers a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D219227
  • Loading branch information
daogottwald committed Aug 15, 2024
1 parent 411eb83 commit 55a0e0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions browser/base/content/contentTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,10 @@
{
lwtProperty: "sidebar_highlight",
processColor(rgbaChannels, element) {
element.toggleAttribute("lwt-sidebar-highlight", !!rgbaChannels);
if (!rgbaChannels) {
element.removeAttribute("lwt-sidebar-highlight");
return null;
}
element.setAttribute("lwt-sidebar-highlight", "true");

const { r, g, b, a } = rgbaChannels;
return `rgba(${r}, ${g}, ${b}, ${a})`;
Expand Down
10 changes: 5 additions & 5 deletions browser/themes/shared/places/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
color-scheme: dark;
}

.sidebar-panel[lwt-sidebar] .sidebar-placesTreechildren::-moz-tree-row(selected) {
background-color: light-dark(hsla(0,0%,80%,.3), rgba(249,249,250,.1));
}
.sidebar-panel[lwt-sidebar] .sidebar-placesTreechildren {
&::-moz-tree-row(selected) {
background-color: light-dark(hsla(0,0%,80%,.3), rgba(249,249,250,.1));
}

.sidebar-panel[lwt-sidebar="dark"] .sidebar-placesTreechildren {
&::-moz-tree-image(selected),
&::-moz-tree-twisty(selected),
&::-moz-tree-cell-text(selected) {
Expand All @@ -42,7 +42,7 @@
}

.sidebar-panel[lwt-sidebar-highlight] .sidebar-placesTreechildren {
&::-moz-tree-row(selected,focus) {
&::-moz-tree-row(selected, focus) {
background-color: var(--lwt-sidebar-highlight-background-color);
}

Expand Down

0 comments on commit 55a0e0c

Please sign in to comment.