Bug 1916762 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
> These values can be played with without a build btw, via prefs, so you can e.g. create a `ui.-moz-sidebar` pref with the value "white".
> 
> The system theme is detectable by CSS (via the lack of `lwtheme` attribute), so we can set `--sidebar-background-color` and co to whatever we want...
> 
Ok thanks, I had forgotten about that. I guess the question is why do you have the `--moz-sidebar` token then? Just a value set for mac for when it isn't set in a style sheet?

> So I looked into it a bit, and I'm happy to change these to white and another grey tone for dark mode, but I don't think something like comment 1 works, specially for the default configuration of horizontal tabs. At least not without also changing the toolbar background too (which is specified [here](https://searchfox.org/mozilla-central/rev/04a47c08504e6357a3164163dd19a47754521204/toolkit/themes/shared/global-shared.css#67)).
> 
> Bug 1917557 makes it work as you want for the windows system theme, and the macOS system theme with `browser.theme.macos.native-theme=false` (the default in release). So that should be some progress, but it seems the main "issue" is that for the macOS system theme the toolbar is white (since the native tab-bar is the native tab bar color).

> For "vertical tabs with no titlebar", where we presumably make everything use the native sidebar effect, then we could use white for the sidebar box (since we probably want to use the native macOS effect for the sidebar + toolbar). But with horizontal tabs it's hard to guarantee contrast with something non-white for the toolbar... Do you have any suggestion for a different toolbar color that isn't white?

Could we set white behind a `sidebar.verticalTabs` pref in the style sheet so it wouldn't affect horizontal tabs?

Thanks for looking into this btw. :)
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
> These values can be played with without a build btw, via prefs, so you can e.g. create a `ui.-moz-sidebar` pref with the value "white".
> 
> The system theme is detectable by CSS (via the lack of `lwtheme` attribute), so we can set `--sidebar-background-color` and co to whatever we want...
> 
Ok thanks, I had forgotten about that. I guess the question is why do you have the `--moz-sidebar` token then? Just a value set for mac for when it isn't set in a style sheet?

> So I looked into it a bit, and I'm happy to change these to white and another grey tone for dark mode, but I don't think something like comment 1 works, specially for the default configuration of horizontal tabs. At least not without also changing the toolbar background too (which is specified [here](https://searchfox.org/mozilla-central/rev/04a47c08504e6357a3164163dd19a47754521204/toolkit/themes/shared/global-shared.css#67)).
> 
> Bug 1917557 makes it work as you want for the windows system theme, and the macOS system theme with `browser.theme.macos.native-theme=false` (the default in release). So that should be some progress, but it seems the main "issue" is that for the macOS system theme the toolbar is white (since the native tab-bar is the native tab bar color).

> For "vertical tabs with no titlebar", where we presumably make everything use the native sidebar effect, then we could use white for the sidebar box (since we probably want to use the native macOS effect for the sidebar + toolbar). But with horizontal tabs it's hard to guarantee contrast with something non-white for the toolbar... Do you have any suggestion for a different toolbar color that isn't white?

What about creating a new variable just for sidebar box use that will use the `toolbar-bgcolor` for light/dark non-system theme and then white for system light?

Thanks for looking into this btw. :)
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
> These values can be played with without a build btw, via prefs, so you can e.g. create a `ui.-moz-sidebar` pref with the value "white".
> 
> The system theme is detectable by CSS (via the lack of `lwtheme` attribute), so we can set `--sidebar-background-color` and co to whatever we want...
> 
Ok thanks, I had forgotten about that. I guess the question is why do you have the `--moz-sidebar` token then? Just a value set for mac for when it isn't set in a style sheet?

> So I looked into it a bit, and I'm happy to change these to white and another grey tone for dark mode, but I don't think something like comment 1 works, specially for the default configuration of horizontal tabs. At least not without also changing the toolbar background too (which is specified [here](https://searchfox.org/mozilla-central/rev/04a47c08504e6357a3164163dd19a47754521204/toolkit/themes/shared/global-shared.css#67)).
> 
> Bug 1917557 makes it work as you want for the windows system theme, and the macOS system theme with `browser.theme.macos.native-theme=false` (the default in release). So that should be some progress, but it seems the main "issue" is that for the macOS system theme the toolbar is white (since the native tab-bar is the native tab bar color).

> For "vertical tabs with no titlebar", where we presumably make everything use the native sidebar effect, then we could use white for the sidebar box (since we probably want to use the native macOS effect for the sidebar + toolbar). But with horizontal tabs it's hard to guarantee contrast with something non-white for the toolbar... Do you have any suggestion for a different toolbar color that isn't white?

I'm confused by the question. I don't think the tabs are using different variables for vertical tabs mode vs horizontal (except for pinned tabs). Maybe a screenshot would help with what you're saying?

Thanks for looking into this btw. :)

Back to Bug 1916762 Comment 4