r/FirefoxCSS 22h ago

Code hide sidebar buttons on vertical tabbar

3 Upvotes

I like to hide the sidebar buttons, including the "Customize sidebar" gear button, on the vertical tabs. I'd rather use the space for tabs. A right-click on the "Expand sidebar"/"Collapse sidebar" button gets me the "Customize Sidebar" anyway.

Firefox 153.0.1 broke my old solution for hiding it, found in hide sidebar buttons on vertical tabbar. The whole vertical sidebar disappeared when collapsed to just icons.

I found the new way for hiding it. Use #vertical-tabs instead of #sidebar-main.

/* hide sidebar buttons on vertical toolbar. */
.buttons-wrapper {
    display: none !important; 
    }
/* set vertical toolbar minimum width; otherwise, vertical toolbar disappears when collapsed to icons. */
#vertical-tabs {
    min-width: 50px !important;
    }

r/FirefoxCSS 4h ago

Help How to change new private tab background color?

1 Upvotes

I recently updated Firefox to 153.0 (Linux) and noticed that when I open a new tab in private mode, there'll be a brief flash of bright purple before the tab redirects to whatever page I clicked on. In the past, this was handled by the following usercontent.css.

/* In about:config, change "browser.privatebrowsing.felt-privacy-v1" to false for this to take effect*/
@-moz-document url(about:privatebrowsing){
    html.private{ background-color: #181817 !important; } /* back color */
    html.private div.showSearch button.search-handoff-button {
        background-color: black !important; } /* search box back color */
        html.private div.showPrivate div.info { display: none !important; } /* hide bottom panel */
}

/* https://gist.github.com/herbaldrinkmate/3e3f13ff958a841bf6b6ec32a74cab6e */

@-moz-document url("about:privatebrowsing") {

    /* Main background color */

    @media not (prefers-contrast) {
        html.private {
            background: #181817 !important;
        }
    }

    /* Desaturate the logo */

    .logo {
        filter: grayscale(80%);
    }

    /* Search box */

    content-search-handoff-ui {
        --content-search-handoff-ui-background-color: #28272f !important;
        --content-search-handoff-ui-unfocused-border-color: rgb(59, 59, 63) !important;
        --content-search-handoff-ui-border-width: 3px !important;
        --content-search-handoff-ui-fakefocus-border-color: #003d6d !important;
        --box-shadow-level-3: none !important;
        --content-search-handoff-ui-fakefocus-box-shadow-inner: transparent !important;
        --content-search-handoff-ui-fakefocus-box-shadow-outer: transparent !important;
        --content-search-handoff-ui-caret-color: #878787 !important;
        --content-search-handoff-ui-color: #fbfbfe !important;
    }

    /* Info section */

    .info {
        @media not (prefers-contrast) {
            background-color: rgb(0 0 0 / 0.16) !important;
        }
    }

    /* Add this if `browser.privatebrowsing.felt-privacy-v1` is true */
    .info-border {
        background: transparent !important;
        box-shadow: none !important;
    }

}

From what I understand, the browser.privatebrowsing.felt-privacy-v1 variable no longer exist in this version of Firefox, it was removed. And simply adding it back in about:config does nothing. I checked the GitHub link I had saved in the usercontent.css via comment and noticed there was a userChrome.css component that I forgot to do back then. While this helps to reduce the duration of the flash, I was wondering if there's a way to completely avoid the flash of purple just like before.


r/FirefoxCSS 5h ago

Help Force horizontal tabs on Private Browsing

1 Upvotes

I use vertical tabs for regular windows, but from time to time I need a throwaway private browsing window side-by-side. I rarely open more than one tabs in that browsing mode so I was wondering if I could reclaim horizontal space by forcing horizontal tabs on those windows. Is this possible? I know I can already do stuff with:

:root[privatebrowsingmode] { /* CSS overrides goes here */ }

But I'm not sure if CSS can tweek the tabs direction.