搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Get userChrome.css to only activate customisations when the sidebar is displaying Tree Style Tab.

  • 無回覆
  • 1 有這個問題
  • 13 次檢視
more options

Since I have the Tree Style Tab extension, I put this code in my userChrome.css to remove the tab strip on the top: ```

/* Hide tab strip but keep space for window buttons */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
    opacity: 0;
    pointer-events: none;
}
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
    visibility: collapse !important;
}
.tab {
    margin-left: 1px;
    margin-right: 1px;
}
:root {
    --tab-toolbar-navbar-overlap: 0px !important; /* fix for full screen mode */
    --tab-min-height: 25px !important;
}
:root #tabbrowser-tabs {
    --tab-min-height: 25px !important;
}
#TabsToolbar {
    height: var(--tab-min-height) !important;
}
@media (prefers-color-scheme: dark) {
    #TabsToolbar {
        background-color: #2B2A33 !important;
    }
}
@media (prefers-color-scheme: light) {
    #TabsToolbar {
        background-color: #F9F9FB !important;
    }
}
#TabsToolbar[inFullscreen="true"] { /* Do not display window buttons space in full screen */
    display:none!important;
}

``` Is there any way to make this block of code to only be activated when the sidebar is on Tree Style Tab? Something like the `#TabsToolbar[inFullscreen="true"]`. Because I can't navigate through tabs if the sidebar is on (for example) bookmarks, or switched off.

Since I have the Tree Style Tab extension, I put this code in my userChrome.css to remove the tab strip on the top: ``` <pre><nowiki>/* Hide tab strip but keep space for window buttons */ #main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items { opacity: 0; pointer-events: none; } #main-window:not([tabsintitlebar="true"]) #TabsToolbar { visibility: collapse !important; } .tab { margin-left: 1px; margin-right: 1px; } :root { --tab-toolbar-navbar-overlap: 0px !important; /* fix for full screen mode */ --tab-min-height: 25px !important; } :root #tabbrowser-tabs { --tab-min-height: 25px !important; } #TabsToolbar { height: var(--tab-min-height) !important; } @media (prefers-color-scheme: dark) { #TabsToolbar { background-color: #2B2A33 !important; } } @media (prefers-color-scheme: light) { #TabsToolbar { background-color: #F9F9FB !important; } } #TabsToolbar[inFullscreen="true"] { /* Do not display window buttons space in full screen */ display:none!important; }</nowiki></pre><br> ``` Is there any way to make this block of code to only be activated when the sidebar is on Tree Style Tab? Something like the `#TabsToolbar[inFullscreen="true"]`. Because I can't navigate through tabs if the sidebar is on (for example) bookmarks, or switched off.

由 cor-el 於 修改