From 99d26740ddcfd9e878feb5b91b33c93314bc074e Mon Sep 17 00:00:00 2001 From: Jimbo Date: Mon, 2 Dec 2024 00:25:14 -0500 Subject: [PATCH] Fix broken CSS theme introduced with Firefox 133 --- .../home/programs/gui/librewolf/quteFox.css | 119 ++++++++++++------ .../services/general/portals/default.nix | 13 +- .../services/general/portals/wlr/default.nix | 11 -- .../settings/nix/autoupgrade/default.nix | 5 - 4 files changed, 91 insertions(+), 57 deletions(-) delete mode 100644 modules/system/services/general/portals/wlr/default.nix diff --git a/modules/home/programs/gui/librewolf/quteFox.css b/modules/home/programs/gui/librewolf/quteFox.css index 9be0846..7b5f7b5 100644 --- a/modules/home/programs/gui/librewolf/quteFox.css +++ b/modules/home/programs/gui/librewolf/quteFox.css @@ -1,8 +1,8 @@ /* try increasing if you encounter problems */ --urlbar-height-setting: 24px; --tab-min-height: 20px !important; - - /* I don't recommend you touch this */ + + /* I don't recommend you touch this unless you know what you're doing */ --arrowpanel-menuitem-padding: 2px !important; --arrowpanel-border-radius: 0px !important; --arrowpanel-menuitem-border-radius: 0px !important; @@ -13,20 +13,20 @@ --toolbar-field-focus-border-color: transparent !important; } -/* --- General debloat ------------------------------ */ +/* --- GENERAL DEBLOAT ---------------------------------- */ -/* bottom left page loading status or url preview */ +/* Bottom left page loading status or url preview */ #statuspanel { display: none !important; } /* remove radius from right-click popup */ menupopup, panel { --panel-border-radius: 0px !important; } menu, menuitem, menucaption { border-radius: 0px !important; } -/* no large buttons in right-click menu */ +/* no stupid large buttons in right-click menu */ menupopup > #context-navigation { display: none !important; } menupopup > #context-sep-navigation { display: none !important; } -/* --- Debloat navbar ------------------------------- */ +/* --- DEBLOAT NAVBAR ----------------------------------- */ #back-button { display: none; } #forward-button { display: none; } @@ -38,11 +38,21 @@ menupopup > #context-sep-navigation { display: none !important; } /* empty space before and after the url bar */ #customizableui-special-spring1, #customizableui-special-spring2 { display: none; } -/* --- Style navbar -------------------------------- */ +/* --- STYLE NAVBAR ------------------------------------ */ /* remove padding between toolbar buttons */ toolbar .toolbarbutton-1 { padding: 0 0 !important; } +/* add it back to the downloads button, otherwise it's too close to the urlbar */ +#downloads-button { + margin-left: 2px !important; +} + +/* add padding to the right of the last button so that it doesn't touch the edge of the window */ +#PanelUI-menu-button { + padding: 0px 4px 0px 0px !important; +} + #urlbar-container { --urlbar-container-height: var(--urlbar-height-setting) !important; margin-left: 0 !important; @@ -70,16 +80,16 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; } } /* keep pop-up menus from overlapping with navbar */ -#widget-overflow { margin: 0 !important; } -#appmenu-popup { margin: 0 !important; } -#customizationui-widget-panel { margin: 0 !important; } -#unified-extensions-panel { margin: 0 !important; } +#widget-overflow { margin: 4px !important; } +#customizationui-widget-panel { margin: 4px !important; } +#unified-extensions-panel { margin-top: 4px !important; } +#appMenu-popup { margin-top: 4px !important; } -/* --- Unified extensions button -------------------- */ +/* --- UNIFIED EXTENSIONS BUTTON ------------------------ */ /* make extension icons smaller */ #unified-extensions-view { - --uei-icon-size: 18px; + --uei-icon-size: 16px; } /* hide bloat */ @@ -95,10 +105,6 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; } padding: 3px 0px !important; } -#unified-extensions-view .unified-extensions-item-menu-button { - margin-inline-end: 0 !important; -} - #unified-extensions-view .toolbarbutton-icon { padding: 0 !important; } @@ -108,7 +114,16 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; } white-space: nowrap !important; } -/* --- Debloat URL bar ------------------------------- */ +#unified-extensions-panel .unified-extensions-item { + margin-block: 0 !important; +} + +.toolbar-menupopup :is(menu, menuitem), .subview-subheader, panelview +.toolbarbutton-1, .subviewbutton, .widget-overflow-list .toolbarbutton-1 { + padding: 4px !important; +} + +/* --- DEBLOAT URLBAR ----------------------------------- */ #identity-box { display: none; } #pageActionButton { display: none; } @@ -125,7 +140,7 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; } /* remove container indicator from urlbar */ #userContext-label, #userContext-indicator { display: none !important;} -/* --- Style tab toolbar ---------------------------- */ +/* --- STYLE TAB TOOLBAR -------------------------------- */ #titlebar { --proton-tab-block-margin: 0px !important; @@ -135,7 +150,6 @@ toolbar .toolbarbutton-1 { padding: 0 0 !important; } #TabsToolbar, .tabbrowser-tab { max-height: var(--tab-min-height) !important; font-size: 14px !important; - outline: none !important; } /* Change color of normal tabs */ @@ -147,6 +161,17 @@ tab:not([selected="true"]) { tab { font-family: var(--tab-font, monospace); border: none !important; + padding-top: 0 !important; +} + +.tab-content { + padding: 0 0 0 var(--tab-inline-padding); +} + +.tab-background { + margin-block: 0 !important; + min-height: var(--tab-min-height); + outline-offset: 0 !important; } /* safari style tab width */ @@ -158,6 +183,9 @@ tab { /* Hide close button on tabs */ #tabbrowser-tabs .tabbrowser-tab .tab-close-button { display: none !important; } +/* disable favicons in tab */ +/* .tab-icon-stack:not([pinned]) { display: none !important; } */ + .tabbrowser-tab { /* remove border between tabs */ padding-inline: 0px !important; @@ -175,7 +203,7 @@ tab { /* Tab: hovered colors */ #tabbrowser-tabs .tabbrowser-tab:hover:not([selected]) .tab-content { - background: var(--tab-hover-bg-color) !important; + background: var(--tab-active-bg-color) !important; } /* hide window controls */ @@ -204,6 +232,10 @@ tab { height: var(--tab-min-height) !important; } +#tabbrowser-tabs { + min-height: var(--tab-min-height) !important; +} + /* remove overflow scroll buttons */ #scrollbutton-up, #scrollbutton-down { display: none !important; } @@ -212,27 +244,40 @@ tab { display: none !important; } -/* --- Autohide Navbar ------------------------------ */ - -/* hide navbar unless focused */ -#nav-bar { - min-height: 0 !important; - max-height: 0 !important; - height: 0 !important; - --moz-transform: scaleY(0) !important; - transform: scaleY(0) !important; +/* hide private browsing indicator */ +#private-browsing-indicator-with-label { + display: none; +} + +/* --- AUTOHIDE NAVBAR ---------------------------------- */ + +#nav-bar, +#urlbar { + transform: translateY(calc(0px - var(--urlbar-height-setting))); + opacity: 0; +} + +#navigator-toolbox { + min-height: var(--tab-min-height) !important; + height: var(--tab-min-height) !important; +} + +#navigator-toolbox:focus-within { + min-height: calc(var(--urlbar-height-setting) + var(--tab-min-height)) !important; + height: calc(var(--urlbar-height-setting) + var(--tab-min-height)) !important; + transform: translateY(calc(0px - var(--tab-min-height))); +} + +#TabsToolbar { + transform: translateY(var(--tab-min-height)); } -/* show on focus */ #nav-bar:focus-within { - --moz-transform: scale(1) !important; - transform: scale(1) !important; - max-height: var(--urlbar-height-setting) !important; - height: var(--urlbar-height-setting) !important; - min-height: var(--urlbar-height-setting) !important; + transform: translateY(var(--tab-min-height)); + opacity: 1; } -#navigator-toolbox:focus-within > .browser-toolbar { +#urlbar:focus-within { transform: translateY(0); opacity: 1; } diff --git a/modules/system/services/general/portals/default.nix b/modules/system/services/general/portals/default.nix index bf2f553..6554b68 100644 --- a/modules/system/services/general/portals/default.nix +++ b/modules/system/services/general/portals/default.nix @@ -1,6 +1,11 @@ -{ ... }: +{ config, pkgs, ... }: { - imports = [ - ./wlr - ]; + xdg.portal.wlr = { + enable = config.system.desktop.enable; + settings.screencast = { + max_fps = 60; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099"; + }; + }; } diff --git a/modules/system/services/general/portals/wlr/default.nix b/modules/system/services/general/portals/wlr/default.nix deleted file mode 100644 index 6554b68..0000000 --- a/modules/system/services/general/portals/wlr/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, pkgs, ... }: -{ - xdg.portal.wlr = { - enable = config.system.desktop.enable; - settings.screencast = { - max_fps = 60; - chooser_type = "simple"; - chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or -B 00000066 -b 00000099"; - }; - }; -} diff --git a/modules/system/settings/nix/autoupgrade/default.nix b/modules/system/settings/nix/autoupgrade/default.nix index bebcef9..d11dd1f 100644 --- a/modules/system/settings/nix/autoupgrade/default.nix +++ b/modules/system/settings/nix/autoupgrade/default.nix @@ -3,11 +3,6 @@ system.autoUpgrade = { enable = true; flake = self.outPath; - flags = [ - "--update-input" - "nixpkgs" - "--commit-lock-file" - ]; dates = "daily"; }; }