Clean: Remove userChrome.tab.shareProton

This commit is contained in:
alstjr7375 2021-12-28 14:10:56 +09:00
parent 0d05071f64
commit c9ec7bc97b
7 changed files with 49 additions and 31 deletions

View file

@ -21,3 +21,24 @@
} }
} }
} }
@include test-module("If not exist pref [mx]") {
@include test("simple") {
@include assert {
@include output {
@include option.NotOption("userChrome.tab.photon") {
body {
font-size: 16px;
}
}
}
@include expect {
@supports not -moz-bool-pref("userChrome.tab.photon") {
body {
font-size: 16px;
}
}
}
}
}
}

View file

@ -85,7 +85,7 @@
padding-right: var(--newtab-button-width-padding) !important; padding-right: var(--newtab-button-width-padding) !important;
} }
@include Option("userChrome.tab.shareProton") { @include NotOption("userChrome.tab.photon") {
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])
> #tabbrowser-arrowscrollbox > #tabbrowser-arrowscrollbox
> .tabbrowser-tab[first-visible-unpinned-tab] { > .tabbrowser-tab[first-visible-unpinned-tab] {
@ -119,7 +119,7 @@
} }
/* Tab - Max Size */ /* Tab - Max Size */
@include Option("userChrome.tab.shareProton") { @include NotOption("userChrome.tab.photon") {
:root { :root {
--tab-max-width: 240px; --tab-max-width: 240px;
} }
@ -134,7 +134,7 @@
} }
/* neighbouring tabs should "pinch" together */ /* neighbouring tabs should "pinch" together */
@include Option("userChrome.tab.shareProton") { @include NotOption("userChrome.tab.photon") {
.tabbrowser-tab { .tabbrowser-tab {
padding-inline: 1px !important; padding-inline: 1px !important;
} }
@ -162,7 +162,7 @@
} }
/* Toolbar Height */ /* Toolbar Height */
@include Option("userChrome.tab.shareProton") { @include NotOption("userChrome.tab.photon") {
:root:not([uidensity="touch"]) #TabsToolbar { :root:not([uidensity="touch"]) #TabsToolbar {
--toolbarbutton-inner-padding: 9px; /* Original: calc((var(--tab-min-height) - 16px) / 2) = 10px */ --toolbarbutton-inner-padding: 9px; /* Original: calc((var(--tab-min-height) - 16px) / 2) = 10px */
} }

View file

@ -1,4 +1,4 @@
@include Option("userChrome.tab.shareProton") { @include NotOption("userChrome.tab.photon") {
.tab-context-line { .tab-context-line {
display: none; display: none;
} }

View file

@ -1,5 +1,7 @@
/*= Unselected Tab - Dynamic Separator =======================================*/ /*= Unselected Tab - Dynamic Separator =======================================*/
@include NotOption("userChrome.tab.photon") {
@import "unselected_tab/dynamic_separator"; @import "unselected_tab/dynamic_separator";
}
/*= Unselected Tab - Static Separator ========================================*/ /*= Unselected Tab - Static Separator ========================================*/
@include Option("userChrome.tab.photon") { @include Option("userChrome.tab.photon") {

View file

@ -57,11 +57,9 @@
} }
} }
@include Option("userChrome.tab.shareProton") {
.tabbrowser-tab:not([visuallyselected], [multiselected], :hover, :first-child) .tab-background::before { .tabbrowser-tab:not([visuallyselected], [multiselected], :hover, :first-child) .tab-background::before {
opacity: var(--tab-separator-opacity); opacity: var(--tab-separator-opacity);
} }
}
@include Option("userChrome.tab.original") { @include Option("userChrome.tab.original") {
#tabs-newtab-button:not(:hover, [open])::before { #tabs-newtab-button:not(:hover, [open])::before {
opacity: var(--tab-separator-opacity); opacity: var(--tab-separator-opacity);
@ -76,7 +74,6 @@
} }
} }
@include Option("userChrome.tab.shareProton") {
#navigator-toolbox:not([movingtab]) #navigator-toolbox:not([movingtab])
.tabbrowser-tab[first-visible-unpinned-tab]:is([visuallyselected], [multiselected], :hover) .tabbrowser-tab[first-visible-unpinned-tab]:is([visuallyselected], [multiselected], :hover)
.tab-background::before, .tab-background::before,
@ -86,7 +83,6 @@
.tab-background::before { .tab-background::before {
opacity: 0 !important; opacity: 0 !important;
} }
}
@include Option("userChrome.tab.original") { @include Option("userChrome.tab.original") {
#navigator-toolbox:not([movingtab]) #navigator-toolbox:not([movingtab])
.tabbrowser-tab:is([visuallyselected], [multiselected], :hover) .tabbrowser-tab:is([visuallyselected], [multiselected], :hover)
@ -112,11 +108,9 @@
/* Animate */ /* Animate */
@media (prefers-reduced-motion: no-preference) { @media (prefers-reduced-motion: no-preference) {
@include Option("userChrome.tab.shareProton") {
.tab-background::before { .tab-background::before {
transition: opacity 0.2s var(--animation-easing-function); /* cubic-bezier(.07, .95, 0, 1) */ transition: opacity 0.2s var(--animation-easing-function); /* cubic-bezier(.07, .95, 0, 1) */
} }
}
@include Option("userChrome.tab.original") { @include Option("userChrome.tab.original") {
#tabs-newtab-button::before { #tabs-newtab-button::before {
transition: opacity 0.2s var(--animation-easing-function); /* cubic-bezier(.07, .95, 0, 1) */ transition: opacity 0.2s var(--animation-easing-function); /* cubic-bezier(.07, .95, 0, 1) */
@ -132,8 +126,6 @@
} }
/* Latest Tab & New tab margin */ /* Latest Tab & New tab margin */
@include Option("userChrome.tab.shareProton") {
#tabbrowser-arrowscrollbox:not([overflowing]) .tabbrowser-tab[last-visible-tab] { #tabbrowser-arrowscrollbox:not([overflowing]) .tabbrowser-tab[last-visible-tab] {
margin-inline-end: 1px !important; margin-inline-end: 1px !important;
} }
}

View file

@ -5,3 +5,9 @@ $tabProton: "userChrome.tab.proton";
@content; @content;
} }
} }
@mixin NotOption($optionName) {
@supports not -moz-bool-pref("#{$optionName}") {
@content;
}
}

View file

@ -27,9 +27,6 @@ user_pref("browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar"
// user_pref("layout.css.prefers-color-scheme.content-override", 3); // user_pref("layout.css.prefers-color-scheme.content-override", 3);
// ** Theme Related Options **************************************************** // ** Theme Related Options ****************************************************
user_pref("userChrome.tab.sharePhoton", true); // Original, Photon
user_pref("userChrome.tab.shareProton", true); // Original, Proton
user_pref("userChrome.tab.original", true); // Original user_pref("userChrome.tab.original", true); // Original
// user_pref("userChrome.tab.photon", true); // Photon // user_pref("userChrome.tab.photon", true); // Photon
// user_pref("userChrome.tab.proton", true); // Proton // user_pref("userChrome.tab.proton", true); // Proton