From b02aad0265947231801206c6332e9651baa6cb7e Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 26 Nov 2023 20:54:24 +0900 Subject: [PATCH] Add: Tab - `userChrome.tab.blue_accent #811` --- css/leptonChrome.css | 46 ++++++++++++++++++++------------------ css/leptonChromeESR.css | 23 ++++++++++--------- src/tab/_selected_tab.scss | 19 +++++++++------- 3 files changed, 48 insertions(+), 40 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 294e5d63..8049ffa9 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -7193,18 +7193,21 @@ @supports -moz-bool-pref("userChrome.tab.photon_like_contextline") or -moz-bool-pref("userChrome.tab.static_separator") or -moz-bool-pref( "userChrome.tab.bar_separator" ) { - :root[lwtheme-mozlightdark] #tabbrowser-tabs, - :root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] { - --tab-line-color: rgb(10, 132, 255) !important; - } - @media (-moz-gtk-csd-available) { - :root:not(:-moz-lwtheme) #tabbrowser-tabs { - --tab-line-color: AccentColor !important; /* -moz-accent-color */ + @supports -moz-bool-pref("userChrome.tab.blue_accent") { + :root, + #tabbrowser-tabs { + --tab-line-color: rgb(10, 132, 255) !important; } - @supports -moz-bool-pref("userChrome.compatibility.accent_color") { + } + @supports not -moz-bool-pref("userChrome.tab.blue_accent") { + @media (-moz-gtk-csd-available) { :root:not(:-moz-lwtheme) #tabbrowser-tabs { - --tab-line-color: Highlight !important; /* -moz-accent-color */ + --tab-line-color: AccentColor !important; /* -moz-accent-color */ + } + @supports -moz-bool-pref("userChrome.compatibility.accent_color") { + :root:not(:-moz-lwtheme) #tabbrowser-tabs { + --tab-line-color: Highlight !important; /* -moz-accent-color */ + } } } } @@ -21118,25 +21121,24 @@ } } /*= Selected Tab - Photon like contextline ===================================*/ -@media (-moz-bool-pref: "userChrome.tab.photon_like_contextline"), - (-moz-bool-pref: "userChrome.tab.static_separator"), - (-moz-bool-pref: "userChrome.tab.bar_separator") { - :root[lwtheme-mozlightdark] #tabbrowser-tabs, - :root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] { +@media (-moz-bool-pref: "userChrome.tab.photon_like_contextline") and (-moz-bool-pref: "userChrome.tab.blue_accent"), + (-moz-bool-pref: "userChrome.tab.static_separator") and (-moz-bool-pref: "userChrome.tab.blue_accent"), + (-moz-bool-pref: "userChrome.tab.bar_separator") and (-moz-bool-pref: "userChrome.tab.blue_accent") { + :root, + #tabbrowser-tabs { --tab-line-color: rgb(10, 132, 255) !important; } } -@media (-moz-bool-pref: "userChrome.tab.photon_like_contextline") and (-moz-gtk-csd-available), - (-moz-bool-pref: "userChrome.tab.static_separator") and (-moz-gtk-csd-available), - (-moz-bool-pref: "userChrome.tab.bar_separator") and (-moz-gtk-csd-available) { +@media (-moz-bool-pref: "userChrome.tab.photon_like_contextline") and (not (-moz-bool-pref: "userChrome.tab.blue_accent")) and (-moz-gtk-csd-available), + (-moz-bool-pref: "userChrome.tab.static_separator") and (not (-moz-bool-pref: "userChrome.tab.blue_accent")) and (-moz-gtk-csd-available), + (-moz-bool-pref: "userChrome.tab.bar_separator") and (not (-moz-bool-pref: "userChrome.tab.blue_accent")) and (-moz-gtk-csd-available) { :root:not(:-moz-lwtheme) #tabbrowser-tabs { --tab-line-color: AccentColor !important; /* -moz-accent-color */ } } -@media (-moz-bool-pref: "userChrome.tab.photon_like_contextline") and (-moz-gtk-csd-available) and (-moz-bool-pref: "userChrome.compatibility.accent_color"), - (-moz-bool-pref: "userChrome.tab.static_separator") and (-moz-gtk-csd-available) and (-moz-bool-pref: "userChrome.compatibility.accent_color"), - (-moz-bool-pref: "userChrome.tab.bar_separator") and (-moz-gtk-csd-available) and (-moz-bool-pref: "userChrome.compatibility.accent_color") { +@media (-moz-bool-pref: "userChrome.tab.photon_like_contextline") and (not (-moz-bool-pref: "userChrome.tab.blue_accent")) and (-moz-gtk-csd-available) and (-moz-bool-pref: "userChrome.compatibility.accent_color"), + (-moz-bool-pref: "userChrome.tab.static_separator") and (not (-moz-bool-pref: "userChrome.tab.blue_accent")) and (-moz-gtk-csd-available) and (-moz-bool-pref: "userChrome.compatibility.accent_color"), + (-moz-bool-pref: "userChrome.tab.bar_separator") and (not (-moz-bool-pref: "userChrome.tab.blue_accent")) and (-moz-gtk-csd-available) and (-moz-bool-pref: "userChrome.compatibility.accent_color") { :root:not(:-moz-lwtheme) #tabbrowser-tabs { --tab-line-color: Highlight !important; /* -moz-accent-color */ } diff --git a/css/leptonChromeESR.css b/css/leptonChromeESR.css index 9e0e4f48..57cda846 100644 --- a/css/leptonChromeESR.css +++ b/css/leptonChromeESR.css @@ -7602,18 +7602,21 @@ @supports -moz-bool-pref("userChrome.tab.photon_like_contextline") or -moz-bool-pref("userChrome.tab.static_separator") or -moz-bool-pref( "userChrome.tab.bar_separator" ) { - :root[lwtheme-mozlightdark] #tabbrowser-tabs, - :root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] { - --tab-line-color: rgb(10, 132, 255) !important; - } - @media (-moz-gtk-csd-available) { - :root:not(:-moz-lwtheme) #tabbrowser-tabs { - --tab-line-color: AccentColor !important; /* -moz-accent-color */ + @supports -moz-bool-pref("userChrome.tab.blue_accent") { + :root, + #tabbrowser-tabs { + --tab-line-color: rgb(10, 132, 255) !important; } - @supports -moz-bool-pref("userChrome.compatibility.accent_color") { + } + @supports not -moz-bool-pref("userChrome.tab.blue_accent") { + @media (-moz-gtk-csd-available) { :root:not(:-moz-lwtheme) #tabbrowser-tabs { - --tab-line-color: Highlight !important; /* -moz-accent-color */ + --tab-line-color: AccentColor !important; /* -moz-accent-color */ + } + @supports -moz-bool-pref("userChrome.compatibility.accent_color") { + :root:not(:-moz-lwtheme) #tabbrowser-tabs { + --tab-line-color: Highlight !important; /* -moz-accent-color */ + } } } } diff --git a/src/tab/_selected_tab.scss b/src/tab/_selected_tab.scss index 4cbdd848..aeb05322 100644 --- a/src/tab/_selected_tab.scss +++ b/src/tab/_selected_tab.scss @@ -45,15 +45,18 @@ "userChrome.tab.photon_like_contextline", "userChrome.tab.static_separator", "userChrome.tab.bar_separator") { - :root[lwtheme-mozlightdark] #tabbrowser-tabs, /* Legacy: v96 */ - :root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] { - --tab-line-color: rgb(10, 132, 255) !important; + @include Option("userChrome.tab.blue_accent") { + :root, + #tabbrowser-tabs { + --tab-line-color: rgb(10, 132, 255) !important; + } } - @include OS("linux") { - :root:not(:-moz-lwtheme) #tabbrowser-tabs { - @include AccentColor("Highlight") { - --tab-line-color: #{$accentColor} !important; /* -moz-accent-color */ + @include NotOption("userChrome.tab.blue_accent") { + @include OS("linux") { + :root:not(:-moz-lwtheme) #tabbrowser-tabs { + @include AccentColor("Highlight") { + --tab-line-color: #{$accentColor} !important; /* -moz-accent-color */ + } } } }