diff --git a/src/tabbar/_container_tab.scss b/src/tabbar/_container_tab.scss index 7f3888a..dbb8d66 100644 --- a/src/tabbar/_container_tab.scss +++ b/src/tabbar/_container_tab.scss @@ -46,6 +46,11 @@ transform: translateY(var(--container-position-y)) !important; width: 16px; } +@include Option("userChrome.tab.close_button_at_pinned") { + .tabbrowser-tab[pinned][visuallyselected]:not([busy]):hover .tab-content::before { + opacity: 0; + } +} /* Pinned Tab - Titlechanged Indicator override */ .tabbrowser-tab:is([image], [pinned])[usercontextid] > .tab-stack > .tab-content[attention]:not([selected="true"]), diff --git a/src/tabbar/_selected_tab.scss b/src/tabbar/_selected_tab.scss index 8ef7dd8..b5b262f 100644 --- a/src/tabbar/_selected_tab.scss +++ b/src/tabbar/_selected_tab.scss @@ -22,3 +22,8 @@ @include Option("userChrome.tab.photon_like_contextline") { @import "selected_tab/photon_like_contextline"; } + +/*= Selected Tab - Photon like contextline ===================================*/ +@include Option("userChrome.tab.close_button_at_pinned") { + @import "selected_tab/pinned_close_button"; +} diff --git a/src/tabbar/clipped_tab/_show_close_button_at_hover.scss b/src/tabbar/clipped_tab/_show_close_button_at_hover.scss index ec8d7eb..b634958 100644 --- a/src/tabbar/clipped_tab/_show_close_button_at_hover.scss +++ b/src/tabbar/clipped_tab/_show_close_button_at_hover.scss @@ -60,7 +60,7 @@ .tab-close-button { padding: 6px !important; /* Original: 7px */ } -.tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-close-button { +.tabbrowser-tab:not(:hover, [pinned]) > .tab-stack > .tab-content > .tab-close-button { padding-inline-start: 1px !important; /* Original: 0px */ width: 19px !important; /* Original: 17px */ } diff --git a/user.js b/user.js index dafae6f..4d6edf0 100644 --- a/user.js +++ b/user.js @@ -76,6 +76,7 @@ user_pref("userChrome.tab.bottom_rounded_corner", true); // user_pref("userChrome.tab.on_bottom", true); // user_pref("userChrome.tab.on_bottom.above_bookmark", true); // Need on_bottom // user_pref("userChrome.tab.always_show_tab_icon", true); +// user_pref("userChrome.tab.close_button_at_pinned", true); // user_pref("userChrome.tab.close_button_at_hover.always", true); // Need close_button_at_hover // user_pref("userChrome.tab.sound_show_label", true); // Need remove sound_hide_label // user_pref("userChrome.tab.centered_label", true); diff --git a/userChrome.css b/userChrome.css index 40bc457..61b97b8 100644 --- a/userChrome.css +++ b/userChrome.css @@ -3973,6 +3973,28 @@ margin: unset !important; } } +/*= Selected Tab - Photon like contextline ===================================*/ +@supports -moz-bool-pref("userChrome.tab.close_button_at_pinned") { + .tabbrowser-tab[pinned][visuallyselected]:not([busy]) .tab-close-button { + display: -moz-box !important; + -moz-box-ordinal-group: 0 !important; + /* Looks like hover */ + width: 24px !important; + height: 24px !important; + margin-inline: -4px !important; + /* (24px - 16px) / 2 */ + } + + .tabbrowser-tab[pinned][visuallyselected]:not([busy]) .tab-icon-stack { + width: 0 !important; + position: absolute; + bottom: 8px; + } + + .tabbrowser-tab[pinned][visuallyselected] .tab-icon-image { + display: none !important; + } +} /*= Unselected Tab - Divide line =============================================*/ /*= Unselected Tab - Dynamic Separator =======================================*/ @supports -moz-bool-pref("userChrome.tab.dynamic_separtor") { @@ -4360,7 +4382,7 @@ /* Original: 7px */ } - .tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-close-button { + .tabbrowser-tab:not(:hover, [pinned]) > .tab-stack > .tab-content > .tab-close-button { padding-inline-start: 1px !important; /* Original: 0px */ width: 19px !important; @@ -4607,6 +4629,11 @@ width: 16px; } + @supports -moz-bool-pref("userChrome.tab.close_button_at_pinned") { + .tabbrowser-tab[pinned][visuallyselected]:not([busy]):hover .tab-content::before { + opacity: 0; + } + } /* Pinned Tab - Titlechanged Indicator override */ .tabbrowser-tab:is([image], [pinned])[usercontextid] > .tab-stack > .tab-content[attention]:not([selected="true"]), .tabbrowser-tab[usercontextid] > .tab-stack > .tab-content[pinned][titlechanged]:not([selected="true"]) {