From 65791a941c1b3aa8dc6cc3395fd4a14ca86258e2 Mon Sep 17 00:00:00 2001 From: Timvde Date: Sat, 26 Jan 2019 19:12:05 +0100 Subject: [PATCH] Add an @-moz-document block to all styles This makes the styles compatible with extension ssuch as reStyle and theoretically slightly improves performance, since styles are more narrowly applied. --- .../activitystream-dark-userChrome.css | 18 +- context-menu/remove-send-to-device.css | 10 +- .../vertical-context-navigation-Linux.css | 142 ++++++------- .../vertical-context-navigation-Windows.css | 152 +++++++------- findbar/compact-findbar-on-top.css | 50 ++--- findbar/hide-highlight-all.css | 6 +- findbar/hide-match-case.css | 8 +- findbar/hide-status.css | 6 +- findbar/hide-whole-words.css | 8 +- hamburger/move-to-top-left-Linux-Windows.css | 36 ++-- hamburger/remove-sync.css | 6 +- navbar/autohide-ev-ssl.css | 12 +- navbar/autohide-info-icon.css | 24 ++- navbar/autohide-reload.css | 26 +-- navbar/autohide-tracking-protection | 12 +- navbar/black-addressbar-private.css | 10 +- navbar/borderless-fields.css | 8 +- navbar/broken-padlock-to-triangle.css | 10 +- navbar/dark-navigation-toolbar-dropdown.css | 30 +-- navbar/deemphasize-ev-ssl.css | 8 +- navbar/emphasize-not-secure.css | 7 +- navbar/hide-addressbar-dropmarker.css | 6 +- navbar/hide-back-forward-maximized.css | 6 +- navbar/hide-back-forward.css | 6 +- navbar/hide-containers-name.css | 6 +- navbar/hide-containers-symbol.css | 6 +- navbar/hide-pageaction-separator.css | 6 +- navbar/hide-puzzle-on-addon-pages.css | 8 +- navbar/hide-ssl-lock.css | 10 +- navbar/hide-zoom-indicator.css | 16 +- navbar/merge-tabbar-navbar-linux.css | 106 +++++----- navbar/move-identity-lock-right.css | 36 ++-- navbar/no-page-action-button.css | 6 +- navbar/overflow-icons-only.css | 8 +- navbar/red-addressbar-insecure.css | 36 ++-- navbar/reload-button-addressbar-left.css | 18 +- navbar/reload-stop-throbber.css | 10 +- navbar/remove-back-button-circle.css | 36 ++-- navbar/right-pageaction-separator.css | 10 +- navbar/sharpen-edges.css | 7 +- navbar/switch-identity-lock.css | 6 +- sidebar/auto-hide-sidebar.css | 74 +++---- sidebar/hide-sidebar-header.css | 6 +- sidebar/sidebar-no-close-button.css | 6 +- sidebar/sidebar-title-to-bottom.css | 12 +- tabs/1px-padding-over-tabs.css | 8 +- tabs/close-button-hover.css | 12 +- tabs/grayscale-favicon.css | 6 +- tabs/hide-favicons.css | 7 +- tabs/hide-tabs-linux-titlebar.css | 6 +- tabs/hide-tabs-macos.css | 54 ++--- tabs/hide-tabs-windows.css | 58 ++--- tabs/material-design.css | 24 ++- tabs/more-compact-tabs.css | 22 +- tabs/prevent-tab-overflow.css | 8 +- tabs/remove-borders.css | 14 +- ...dding-when-not-maximized-macOS-Windows.css | 54 ++--- tabs/sound-indicator-to-the-left.css | 81 +++---- tabs/tab-line-colors.css | 18 +- tabs/tabs-on-bottom-macOS.css | 82 ++++---- tabs/tabs-on-bottom-titlebar.css | 22 +- tabs/underline-pending-tabs.css | 8 +- tabs/x-on-left.css | 21 +- toolbars/auto-hide.css | 198 +++++++++--------- toolbars/compact-toolbars.css | 30 +-- toolbars/faviconized-bookmarks.css | 16 +- toolbars/show-bookmarks-only-on-newtab.css | 20 +- toolbars/sliding-bookmarks-bar.css | 42 ++-- toolbars/vertical-toolbar-right-side.css | 147 ++++++------- 69 files changed, 1065 insertions(+), 929 deletions(-) diff --git a/activitystream/activitystream-dark-userChrome.css b/activitystream/activitystream-dark-userChrome.css index 8f6fbfb..c4ea627 100644 --- a/activitystream/activitystream-dark-userChrome.css +++ b/activitystream/activitystream-dark-userChrome.css @@ -6,14 +6,16 @@ * Contributor(s): Andrei Cristian Petcu */ -.browserContainer { - background-color: var(--url-and-searchbar-background-color, hsla(0,0%,100%,.8)) !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + .browserContainer { + background-color: var(--url-and-searchbar-background-color, hsla(0,0%,100%,.8)) !important; + } -#sidebar { - background-color: white !important; -} + #sidebar { + background-color: white !important; + } -.sidebar-placesTree { - background-color: white !important; + .sidebar-placesTree { + background-color: white !important; + } } diff --git a/context-menu/remove-send-to-device.css b/context-menu/remove-send-to-device.css index 84914fc..54d3ba4 100644 --- a/context-menu/remove-send-to-device.css +++ b/context-menu/remove-send-to-device.css @@ -5,8 +5,10 @@ * Contributor(s): PilzAdam */ -#context-sendpagetodevice, #context-sep-sendpagetodevice, -#context-sendlinktodevice, #context-sep-sendlinktodevice, -#context_sendTabToDevice, #context_sendTabToDevice_separator { - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #context-sendpagetodevice, #context-sep-sendpagetodevice, + #context-sendlinktodevice, #context-sep-sendlinktodevice, + #context_sendTabToDevice, #context_sendTabToDevice_separator { + display: none !important; + } } diff --git a/context-menu/vertical-context-navigation-Linux.css b/context-menu/vertical-context-navigation-Linux.css index 386a575..e3f9550 100644 --- a/context-menu/vertical-context-navigation-Linux.css +++ b/context-menu/vertical-context-navigation-Linux.css @@ -4,86 +4,88 @@ * Contributor(s): MrOtherGuy */ -/* Set the container vertical and disable the its pointer events */ -#contentAreaContextMenu #context-navigation:not([hidden]) { - -moz-box-orient: vertical !important; - position:absolute !important; - background-color: transparent !important; - pointer-events: none; -} +@-moz-document url(chrome://browser/content/browser.xul) { + /* Set the container vertical and disable the its pointer events */ + #contentAreaContextMenu #context-navigation:not([hidden]) { + -moz-box-orient: vertical !important; + position:absolute !important; + background-color: transparent !important; + pointer-events: none; + } -/* Enable individual buttons' pointer-events which would otherwise be disabled through cascade */ -#contentAreaContextMenu #context-navigation:not([hidden]) menuitem { - pointer-events: auto !important; - position:absolute !important; -} + /* Enable individual buttons' pointer-events which would otherwise be disabled through cascade */ + #contentAreaContextMenu #context-navigation:not([hidden]) menuitem { + pointer-events: auto !important; + position:absolute !important; + } -/* Move all context-menu entries right except the navigation items */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ * { - margin-left: 38px !important; -} + /* Move all context-menu entries right except the navigation items */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ * { + margin-left: 38px !important; + } -/* Hardcode the elements' heights in case they are different on some platforms */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menu, -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem { - min-height:24px !important; - height:24px !important; -} + /* Hardcode the elements' heights in case they are different on some platforms */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menu, + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem { + min-height:24px !important; + height:24px !important; + } -/* Get rid of now unimportant separator */ -#context-sep-navigation { - display:none; -} + /* Get rid of now unimportant separator */ + #context-sep-navigation { + display:none; + } -/* Move text leftwards - not the whole elements */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem > .menu-text, -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menu > .menu-text { - margin-left: -20px !important; - padding-inline-start: 30px !important; -} + /* Move text leftwards - not the whole elements */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem > .menu-text, + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menu > .menu-text { + margin-left: -20px !important; + padding-inline-start: 30px !important; + } -/* Move menuitems up. Will fail if save-page item is for some reason not the topmost */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ #context-savepage, -#contentAreaContextMenu #context-navigation:not([hidden]) ~ #context-sep-navigation + menuitem[generateditemid] { - margin-top: -146px !important; -} + /* Move menuitems up. Will fail if save-page item is for some reason not the topmost */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ #context-savepage, + #contentAreaContextMenu #context-navigation:not([hidden]) ~ #context-sep-navigation + menuitem[generateditemid] { + margin-top: -146px !important; + } -/* There can be generated menuitems such as Edit-page that appears on MDN so need to handle them */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem[generateditemid] ~ #context-savepage { - margin-top: unset !important; -} + /* There can be generated menuitems such as Edit-page that appears on MDN so need to handle them */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem[generateditemid] ~ #context-savepage { + margin-top: unset !important; + } -/* -* This is needed because it is necessary to adjust the bottom * margin of last -* ENABLED element. So create a pseudo-element which will always be last and set -* it's margin. -*/ -#contentAreaContextMenu .scrollbox-innerbox::after { - content: ""; - position: absolute; - margin-bottom:124px; - visibility: hidden; -} + /* + * This is needed because it is necessary to adjust the bottom * margin of last + * ENABLED element. So create a pseudo-element which will always be last and set + * it's margin. + */ + #contentAreaContextMenu .scrollbox-innerbox::after { + content: ""; + position: absolute; + margin-bottom:124px; + visibility: hidden; + } -/* At this point there's a rather big bottom margin which then causes overflow buttons to appear */ -#contentAreaContextMenu autorepeatbutton { - display:none; -} + /* At this point there's a rather big bottom margin which then causes overflow buttons to appear */ + #contentAreaContextMenu autorepeatbutton { + display:none; + } -/* - * Get rid of the margin when navigation buttons are disabled. Watching - * collapsed attribute of autorepeatbutton is only way to track such case - */ -#contentAreaContextMenu autorepeatbutton[collapsed] ~ .arrowscrollbox-scrollbox .scrollbox-innerbox::after { - display:none; -} + /* + * Get rid of the margin when navigation buttons are disabled. Watching + * collapsed attribute of autorepeatbutton is only way to track such case + */ + #contentAreaContextMenu autorepeatbutton[collapsed] ~ .arrowscrollbox-scrollbox .scrollbox-innerbox::after { + display:none; + } -/* Also disable the margin on sub-menus unconditionally */ -#contentAreaContextMenu menupopup .scrollbox-innerbox::after { - display: none; -} + /* Also disable the margin on sub-menus unconditionally */ + #contentAreaContextMenu menupopup .scrollbox-innerbox::after { + display: none; + } -/* You could scroll the menu without this - safe to remove if that's not a problem */ -#contentAreaContextMenu .scrollbox-innerbox { - overflow: hidden; + /* You could scroll the menu without this - safe to remove if that's not a problem */ + #contentAreaContextMenu .scrollbox-innerbox { + overflow: hidden; + } } diff --git a/context-menu/vertical-context-navigation-Windows.css b/context-menu/vertical-context-navigation-Windows.css index 2fefd36..30e257c 100644 --- a/context-menu/vertical-context-navigation-Windows.css +++ b/context-menu/vertical-context-navigation-Windows.css @@ -4,93 +4,95 @@ * Contributor(s): MrOtherGuy */ -/* Set the container vertical and disable the its pointer events */ -#contentAreaContextMenu #context-navigation:not([hidden]) { - -moz-box-orient: vertical !important; - position:absolute !important; - background-color: transparent !important; - pointer-events: none; -} +@-moz-document url(chrome://browser/content/browser.xul) { + /* Set the container vertical and disable the its pointer events */ + #contentAreaContextMenu #context-navigation:not([hidden]) { + -moz-box-orient: vertical !important; + position:absolute !important; + background-color: transparent !important; + pointer-events: none; + } -/* Enable individual buttons' pointer-events which would otherwise be disabled through cascade */ -#contentAreaContextMenu #context-navigation:not([hidden]) menuitem { - pointer-events: auto !important; - position:absolute !important; -} + /* Enable individual buttons' pointer-events which would otherwise be disabled through cascade */ + #contentAreaContextMenu #context-navigation:not([hidden]) menuitem { + pointer-events: auto !important; + position:absolute !important; + } -/* Move all context-menu entries right except the navigation items */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ * { - margin-left: 30px !important; -} + /* Move all context-menu entries right except the navigation items */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ * { + margin-left: 30px !important; + } -/* Hardcode the elements' heights in case they are different on some platforms */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menu, -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem { - min-height:24px !important; - height:24px !important; -} + /* Hardcode the elements' heights in case they are different on some platforms */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menu, + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem { + min-height:24px !important; + height:24px !important; + } -/* Get rid of now unimportant separator */ -#context-sep-navigation { - display:none; -} + /* Get rid of now unimportant separator */ + #context-sep-navigation { + display:none; + } -/* Move only text leftwards - not the whole elements */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem > .menu-text, -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menu > .menu-text { - margin-left: -20px !important; -} + /* Move only text leftwards - not the whole elements */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem > .menu-text, + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menu > .menu-text { + margin-left: -20px !important; + } -/* Move menuitems up. Will fail if save-page item is for some reason not the topmost */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ #context-savepage, -#contentAreaContextMenu #context-navigation:not([hidden]) ~ #context-sep-navigation + menuitem[generateditemid] { - margin-top: -128px !important; -} + /* Move menuitems up. Will fail if save-page item is for some reason not the topmost */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ #context-savepage, + #contentAreaContextMenu #context-navigation:not([hidden]) ~ #context-sep-navigation + menuitem[generateditemid] { + margin-top: -128px !important; + } -/* There can be generated menuitems such as Edit-page that appears on MDN so need to handle them */ -#contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem[generateditemid] ~ #context-savepage { - margin-top: unset !important; -} + /* There can be generated menuitems such as Edit-page that appears on MDN so need to handle them */ + #contentAreaContextMenu #context-navigation:not([hidden]) ~ menuitem[generateditemid] ~ #context-savepage { + margin-top: unset !important; + } -/* -* This is needed because it is necessary to adjust the bottom * margin of last -* ENABLED element. So create a pseudo-element which will always be last and set -* it's margin. -*/ -#contentAreaContextMenu .scrollbox-innerbox::after { - content: ""; - position: absolute; - margin-bottom:106px; - visibility: hidden; -} + /* + * This is needed because it is necessary to adjust the bottom * margin of last + * ENABLED element. So create a pseudo-element which will always be last and set + * it's margin. + */ + #contentAreaContextMenu .scrollbox-innerbox::after { + content: ""; + position: absolute; + margin-bottom:106px; + visibility: hidden; + } -/* At this point there's a rather big bottom margin which then causes overflow buttons to appear */ -#contentAreaContextMenu autorepeatbutton { - display:none; -} + /* At this point there's a rather big bottom margin which then causes overflow buttons to appear */ + #contentAreaContextMenu autorepeatbutton { + display:none; + } -/* - * Get rid of the margin when navigation buttons are disabled. Watching - * collapsed attribute of autorepeatbutton is only way to track such case - */ -#contentAreaContextMenu autorepeatbutton[collapsed] ~ .arrowscrollbox-scrollbox .scrollbox-innerbox::after { - display:none; -} + /* + * Get rid of the margin when navigation buttons are disabled. Watching + * collapsed attribute of autorepeatbutton is only way to track such case + */ + #contentAreaContextMenu autorepeatbutton[collapsed] ~ .arrowscrollbox-scrollbox .scrollbox-innerbox::after { + display:none; + } -/* Also disable the margin on sub-menus unconditionally */ -#contentAreaContextMenu menupopup .scrollbox-innerbox::after { - display: none; -} + /* Also disable the margin on sub-menus unconditionally */ + #contentAreaContextMenu menupopup .scrollbox-innerbox::after { + display: none; + } -/* You could scroll the menu without this - safe to remove if that's not a problem */ -#contentAreaContextMenu .scrollbox-innerbox { - overflow: hidden; -} + /* You could scroll the menu without this - safe to remove if that's not a problem */ + #contentAreaContextMenu .scrollbox-innerbox { + overflow: hidden; + } -/* Effectively remove vertical separator line on Windows7 */ -@media (-moz-os-version: windows-win7) { - #contentAreaContextMenu { - -moz-appearance:none !important; - border: 1px solid darkgrey !important; + /* Effectively remove vertical separator line on Windows7 */ + @media (-moz-os-version: windows-win7) { + #contentAreaContextMenu { + -moz-appearance:none !important; + border: 1px solid darkgrey !important; + } } } diff --git a/findbar/compact-findbar-on-top.css b/findbar/compact-findbar-on-top.css index 067d53f..1d0f2a1 100644 --- a/findbar/compact-findbar-on-top.css +++ b/findbar/compact-findbar-on-top.css @@ -4,32 +4,34 @@ * Contributor(s): Madis0 */ -.browserContainer > findbar { - -moz-box-ordinal-group: 0; - position: fixed !important; - right: 1em; - border: 1px solid threedshadow !important; +@-moz-document url(chrome://browser/content/browser.xul) { + .browserContainer > findbar { + -moz-box-ordinal-group: 0; + position: fixed !important; + right: 1em; + border: 1px solid threedshadow !important; - /* Hide the "border" at the top by removing the box-shadow and background-image */ - border-top: none !important; - box-shadow: none !important; - background-image: none !important; + /* Hide the "border" at the top by removing the box-shadow and background-image */ + border-top: none !important; + box-shadow: none !important; + background-image: none !important; - /* Uncomment to add a transition from the top */ - /* - transition: 400ms !important; - z-index: 0 !important; - */ -} + /* Uncomment to add a transition from the top */ + /* + transition: 400ms !important; + z-index: 0 !important; + */ + } -/* Margin from top when hidden (necessary for the transition to work) */ -/*findbar[hidden]{ margin-top: -2em !important; }*/ + /* Margin from top when hidden (necessary for the transition to work) */ + /*findbar[hidden]{ margin-top: -2em !important; }*/ -/* Aligns the close button to the center */ -.findbar-closebutton { - margin-inline-start: 0.5em !important; - vertical-align: middle !important; - margin-bottom: 0.25em !important; - height: inherit !important; -} + /* Aligns the close button to the center */ + .findbar-closebutton { + margin-inline-start: 0.5em !important; + vertical-align: middle !important; + margin-bottom: 0.25em !important; + height: inherit !important; + } +} diff --git a/findbar/hide-highlight-all.css b/findbar/hide-highlight-all.css index bfe9936..5e6b4be 100644 --- a/findbar/hide-highlight-all.css +++ b/findbar/hide-highlight-all.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -.findbar-highlight { - visibility: collapse !important; +@-moz-document url(chrome://browser/content/browser.xul) { + .findbar-highlight { + visibility: collapse !important; + } } diff --git a/findbar/hide-match-case.css b/findbar/hide-match-case.css index 257c76f..5620269 100644 --- a/findbar/hide-match-case.css +++ b/findbar/hide-match-case.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -.findbar-case-sensitive { - visibility: collapse !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + .findbar-case-sensitive { + visibility: collapse !important; + } +} diff --git a/findbar/hide-status.css b/findbar/hide-status.css index 201288c..5ce56dc 100644 --- a/findbar/hide-status.css +++ b/findbar/hide-status.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -.findbar-find-status { - visibility: collapse !important; +@-moz-document url(chrome://browser/content/browser.xul) { + .findbar-find-status { + visibility: collapse !important; + } } diff --git a/findbar/hide-whole-words.css b/findbar/hide-whole-words.css index 140df16..0e9880e 100644 --- a/findbar/hide-whole-words.css +++ b/findbar/hide-whole-words.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -.findbar-entire-word { - visibility: collapse !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + .findbar-entire-word { + visibility: collapse !important; + } +} diff --git a/hamburger/move-to-top-left-Linux-Windows.css b/hamburger/move-to-top-left-Linux-Windows.css index 0ba2ddd..ec42e74 100644 --- a/hamburger/move-to-top-left-Linux-Windows.css +++ b/hamburger/move-to-top-left-Linux-Windows.css @@ -4,25 +4,27 @@ * Contributor(s): Alex Vallat */ -#PanelUI-button { - -moz-box-ordinal-group: 0; - border-left: none !important; - position: absolute; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #PanelUI-button { + -moz-box-ordinal-group: 0; + border-left: none !important; + position: absolute; + } -:root[uidensity=compact] #PanelUI-button { - margin-top: -28px; -} + :root[uidensity=compact] #PanelUI-button { + margin-top: -28px; + } -#PanelUI-button { - margin-top: -30px; -} + #PanelUI-button { + margin-top: -30px; + } -:root[uidensity=touch] #PanelUI-button { - margin-top: -36px; -} + :root[uidensity=touch] #PanelUI-button { + margin-top: -36px; + } -#TabsToolbar { - /* Ensure the padding is always present even when maximized */ - padding-inline-start: 40px !important; + #TabsToolbar { + /* Ensure the padding is always present even when maximized */ + padding-inline-start: 40px !important; + } } diff --git a/hamburger/remove-sync.css b/hamburger/remove-sync.css index fab09fa..4a100a6 100644 --- a/hamburger/remove-sync.css +++ b/hamburger/remove-sync.css @@ -4,6 +4,8 @@ * Contributor(s): PilzAdam */ -#appMenu-fxa-container, #appMenu-fxa-container + toolbarseparator { - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #appMenu-fxa-container, #appMenu-fxa-container + toolbarseparator { + display: none !important; + } } diff --git a/navbar/autohide-ev-ssl.css b/navbar/autohide-ev-ssl.css index 2c4cacf..ac0afdc 100644 --- a/navbar/autohide-ev-ssl.css +++ b/navbar/autohide-ev-ssl.css @@ -4,10 +4,12 @@ * Contributor(s): Madis0 */ -#identity-icon-label { /* Hides the EV SSL label */ - visibility: collapse !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #identity-icon-label { /* Hides the EV SSL label */ + visibility: collapse !important; + } -#identity-box:hover > #identity-icon-labels > #identity-icon-label { /* Shows the label on identity box hover */ - visibility: visible !important; + #identity-box:hover > #identity-icon-labels > #identity-icon-label { /* Shows the label on identity box hover */ + visibility: visible !important; + } } diff --git a/navbar/autohide-info-icon.css b/navbar/autohide-info-icon.css index ff7207b..8272ed5 100644 --- a/navbar/autohide-info-icon.css +++ b/navbar/autohide-info-icon.css @@ -5,16 +5,18 @@ * Contributor(s): Madis0 */ -/* Hide info icon for sites that don't have permissions */ -#urlbar :not(.grantedPermissions) #identity-icon { - transition: 300ms !important; /* Animate icon hiding */ - opacity: 0 !important; /* Make icons transparent */ - -moz-margin-end: -1.1em !important; /* Hide icons by offsetting them */ -} +@-moz-document url(chrome://browser/content/browser.xul) { + /* Hide info icon for sites that don't have permissions */ + #urlbar :not(.grantedPermissions) #identity-icon { + transition: 300ms !important; /* Animate icon hiding */ + opacity: 0 !important; /* Make icons transparent */ + -moz-margin-end: -1.1em !important; /* Hide icons by offsetting them */ + } -/* Show info icon on navbar hover, except for new tab page search icon */ -#urlbar[pageproxystate="valid"]:hover #identity-icon { - transition: 300ms !important; /* Animate icon showing */ - opacity: 1 !important; /* Make icons opaque */ - -moz-margin-end: initial !important; /* Use initial margins to show icons */ + /* Show info icon on navbar hover, except for new tab page search icon */ + #urlbar[pageproxystate="valid"]:hover #identity-icon { + transition: 300ms !important; /* Animate icon showing */ + opacity: 1 !important; /* Make icons opaque */ + -moz-margin-end: initial !important; /* Use initial margins to show icons */ + } } diff --git a/navbar/autohide-reload.css b/navbar/autohide-reload.css index fe83395..c5d2ca7 100644 --- a/navbar/autohide-reload.css +++ b/navbar/autohide-reload.css @@ -4,17 +4,19 @@ * Contributor(s): Madis0 */ -/* Hide the reload button by default */ -#reload-button { - transition: 300ms !important; /* Animate icon hiding */ - opacity: 0 !important; /* Make icon transparent */ - -moz-margin-end: -2em !important; /* Hide icon by offsetting it */ -} +@-moz-document url(chrome://browser/content/browser.xul) { + /* Hide the reload button by default */ + #reload-button { + transition: 300ms !important; /* Animate icon hiding */ + opacity: 0 !important; /* Make icon transparent */ + -moz-margin-end: -2em !important; /* Hide icon by offsetting it */ + } -/* Show the reload button on navbar hover or page load (animation/stop button) */ -#nav-bar:hover #reload-button, -#stop-reload-button[animate] > #reload-button:not([displaystop]) { - transition: 300ms !important; /* Animate icon showing */ - opacity: 1 !important; /* Make the icon opaque */ - -moz-margin-end: initial !important; /* Use initial margins to show the icon */ + /* Show the reload button on navbar hover or page load (animation/stop button) */ + #nav-bar:hover #reload-button, + #stop-reload-button[animate] > #reload-button:not([displaystop]) { + transition: 300ms !important; /* Animate icon showing */ + opacity: 1 !important; /* Make the icon opaque */ + -moz-margin-end: initial !important; /* Use initial margins to show the icon */ + } } diff --git a/navbar/autohide-tracking-protection b/navbar/autohide-tracking-protection index 46975e6..9aa6631 100644 --- a/navbar/autohide-tracking-protection +++ b/navbar/autohide-tracking-protection @@ -4,10 +4,12 @@ * Contributor: Joachim Vandersmissen */ -#tracking-protection-icon { - visibility: collapse !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #tracking-protection-icon { + visibility: collapse !important; + } -#identity-box:hover > #tracking-protection-icon { - visibility: visible !important; + #identity-box:hover > #tracking-protection-icon { + visibility: visible !important; + } } diff --git a/navbar/black-addressbar-private.css b/navbar/black-addressbar-private.css index b6bf62f..19da3e0 100644 --- a/navbar/black-addressbar-private.css +++ b/navbar/black-addressbar-private.css @@ -4,8 +4,10 @@ * Contributor(s): Madis0 */ -#main-window[privatebrowsingmode="temporary"] #urlbar -{ - background: black !important; - color: white !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #main-window[privatebrowsingmode="temporary"] #urlbar + { + background: black !important; + color: white !important; + } } diff --git a/navbar/borderless-fields.css b/navbar/borderless-fields.css index d3bea28..7b01735 100644 --- a/navbar/borderless-fields.css +++ b/navbar/borderless-fields.css @@ -6,7 +6,9 @@ * Contributor(s): Madis0 */ -#urlbar, .searchbar-textbox { - border: none !important; - box-shadow: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #urlbar, .searchbar-textbox { + border: none !important; + box-shadow: none !important; + } } diff --git a/navbar/broken-padlock-to-triangle.css b/navbar/broken-padlock-to-triangle.css index 1c86ced..77a10e8 100644 --- a/navbar/broken-padlock-to-triangle.css +++ b/navbar/broken-padlock-to-triangle.css @@ -4,8 +4,10 @@ * Contributor(s): Madis0 */ -#urlbar[pageproxystate="valid"] > #identity-box.notSecure > #connection-icon, -#urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms > #connection-icon, -#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent > #connection-icon { - list-style-image: url("chrome://mozapps/skin/extensions/alerticon-error.svg") !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #urlbar[pageproxystate="valid"] > #identity-box.notSecure > #connection-icon, + #urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms > #connection-icon, + #urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent > #connection-icon { + list-style-image: url("chrome://mozapps/skin/extensions/alerticon-error.svg") !important; + } } diff --git a/navbar/dark-navigation-toolbar-dropdown.css b/navbar/dark-navigation-toolbar-dropdown.css index 56b3d8c..69c77f7 100644 --- a/navbar/dark-navigation-toolbar-dropdown.css +++ b/navbar/dark-navigation-toolbar-dropdown.css @@ -3,21 +3,23 @@ * * Contributor(s): hyperfekt */ - -#PopupAutoCompleteRichResult { - background-image: none !important; - background-color: var(--url-and-searchbar-background-color) !important; - --panel-separator-color: rgb(146, 146, 146) !important; -} -.search-panel-header, .search-panel-one-offs { - background-color: var(--chrome-secondary-background-color) !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #PopupAutoCompleteRichResult { + background-image: none !important; + background-color: var(--url-and-searchbar-background-color) !important; + --panel-separator-color: rgb(146, 146, 146) !important; + } -richlistbox, .search-panel-input-value { - color: var(--lwt-text-color) !important; -} + .search-panel-header, .search-panel-one-offs { + background-color: var(--chrome-secondary-background-color) !important; + } + + richlistbox, .search-panel-input-value { + color: var(--lwt-text-color) !important; + } -.ac-separator:not([selected="true"]), .ac-url:not([selected="true"]), .ac-action:not([selected="true"]) { - color: hsl(211, 100%, 65%) !important; + .ac-separator:not([selected="true"]), .ac-url:not([selected="true"]), .ac-action:not([selected="true"]) { + color: hsl(211, 100%, 65%) !important; + } } diff --git a/navbar/deemphasize-ev-ssl.css b/navbar/deemphasize-ev-ssl.css index 8f641f3..ba86697 100644 --- a/navbar/deemphasize-ev-ssl.css +++ b/navbar/deemphasize-ev-ssl.css @@ -5,7 +5,9 @@ * Contributor(s): Madis0 */ -#urlbar > #identity-box.verifiedIdentity > #identity-icon-labels > #identity-icon-label, -#urlbar > #identity-box.verifiedIdentity > #identity-icon-labels > #identity-icon-country-label { - color: rgba(38, 50, 56, 0.867) !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #urlbar > #identity-box.verifiedIdentity > #identity-icon-labels > #identity-icon-label, + #urlbar > #identity-box.verifiedIdentity > #identity-icon-labels > #identity-icon-country-label { + color: rgba(38, 50, 56, 0.867) !important; + } } diff --git a/navbar/emphasize-not-secure.css b/navbar/emphasize-not-secure.css index 261a836..0ac07dd 100644 --- a/navbar/emphasize-not-secure.css +++ b/navbar/emphasize-not-secure.css @@ -6,7 +6,8 @@ * Contributor(s): Madis0 */ - -#urlbar > #identity-box.notSecureText > #identity-icon-labels > #identity-icon-label { - color: rgba(255, 0, 0, 0.867) !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #urlbar > #identity-box.notSecureText > #identity-icon-labels > #identity-icon-label { + color: rgba(255, 0, 0, 0.867) !important; + } } diff --git a/navbar/hide-addressbar-dropmarker.css b/navbar/hide-addressbar-dropmarker.css index db6518d..d3c7cbb 100644 --- a/navbar/hide-addressbar-dropmarker.css +++ b/navbar/hide-addressbar-dropmarker.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -.urlbar-history-dropmarker{ - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + .urlbar-history-dropmarker{ + display: none !important; + } } diff --git a/navbar/hide-back-forward-maximized.css b/navbar/hide-back-forward-maximized.css index 6b3774a..67a45c5 100644 --- a/navbar/hide-back-forward-maximized.css +++ b/navbar/hide-back-forward-maximized.css @@ -6,6 +6,8 @@ * Contributor(s): Madis0 */ -#main-window[sizemode="maximized"] :-moz-any(#back-button, #forward-button) { - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #main-window[sizemode="maximized"] :-moz-any(#back-button, #forward-button) { + display: none !important; + } } diff --git a/navbar/hide-back-forward.css b/navbar/hide-back-forward.css index 7606a4a..9808513 100644 --- a/navbar/hide-back-forward.css +++ b/navbar/hide-back-forward.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0, Timvde */ -#main-window :-moz-any(#back-button, #forward-button) { - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #main-window :-moz-any(#back-button, #forward-button) { + display: none !important; + } } diff --git a/navbar/hide-containers-name.css b/navbar/hide-containers-name.css index f72099b..867def8 100644 --- a/navbar/hide-containers-name.css +++ b/navbar/hide-containers-name.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -#userContext-label { - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #userContext-label { + display: none !important; + } } diff --git a/navbar/hide-containers-symbol.css b/navbar/hide-containers-symbol.css index 41dc79d..4ad39b3 100644 --- a/navbar/hide-containers-symbol.css +++ b/navbar/hide-containers-symbol.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -#userContext-indicator { - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #userContext-indicator { + display: none !important; + } } diff --git a/navbar/hide-pageaction-separator.css b/navbar/hide-pageaction-separator.css index 1ff1a10..010fc28 100644 --- a/navbar/hide-pageaction-separator.css +++ b/navbar/hide-pageaction-separator.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -#pageActionSeparator{ - display: none; +@-moz-document url(chrome://browser/content/browser.xul) { + #pageActionSeparator{ + display: none; + } } diff --git a/navbar/hide-puzzle-on-addon-pages.css b/navbar/hide-puzzle-on-addon-pages.css index facd629..b32ce3e 100644 --- a/navbar/hide-puzzle-on-addon-pages.css +++ b/navbar/hide-puzzle-on-addon-pages.css @@ -3,7 +3,9 @@ * * Contributor(s): Madis0 */ - -#urlbar[pageproxystate="valid"] > #identity-box.extensionPage > #extension-icon { - display: none !important; + +@-moz-document url(chrome://browser/content/browser.xul) { + #urlbar[pageproxystate="valid"] > #identity-box.extensionPage > #extension-icon { + display: none !important; + } } diff --git a/navbar/hide-ssl-lock.css b/navbar/hide-ssl-lock.css index ed65032..32d9c18 100644 --- a/navbar/hide-ssl-lock.css +++ b/navbar/hide-ssl-lock.css @@ -5,8 +5,10 @@ * Contributor(s): Madis0 */ -#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon, -#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon, -#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon { - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon, + #urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon, + #urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon { + display: none !important; + } } diff --git a/navbar/hide-zoom-indicator.css b/navbar/hide-zoom-indicator.css index be4b904..22cc68c 100644 --- a/navbar/hide-zoom-indicator.css +++ b/navbar/hide-zoom-indicator.css @@ -6,12 +6,14 @@ * Contributor(s): BubiBalboa */ -/* Hides the zoom indicator */ -#urlbar-zoom-button { - display: none !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + /* Hides the zoom indicator */ + #urlbar-zoom-button { + display: none !important; + } -/* Hides vertical separator line to make it look cleaner */ -#pageActionSeparator { - display: none !important; + /* Hides vertical separator line to make it look cleaner */ + #pageActionSeparator { + display: none !important; + } } diff --git a/navbar/merge-tabbar-navbar-linux.css b/navbar/merge-tabbar-navbar-linux.css index 5d480f8..d638e0c 100644 --- a/navbar/merge-tabbar-navbar-linux.css +++ b/navbar/merge-tabbar-navbar-linux.css @@ -4,65 +4,67 @@ * Contributor(s): Madis0 */ -/* Variable values depending on layout. Use these to customize style. */ +@-moz-document url(chrome://browser/content/browser.xul) { + /* Variable values depending on layout. Use these to customize style. */ -/* Compact density */ -:root[uidensity=compact] { - --tabs-margin-left: 5.5em; /* Keep margin for button background */ - --space-before-tabs: 34.5em; /* Left margin for nav bar */ - --space-after-tabs: 2em; /* Right margin for caption button, menu */ -} + /* Compact density */ + :root[uidensity=compact] { + --tabs-margin-left: 5.5em; /* Keep margin for button background */ + --space-before-tabs: 34.5em; /* Left margin for nav bar */ + --space-after-tabs: 2em; /* Right margin for caption button, menu */ + } -/* Touch density */ -:root[uidensity=touch] { - --tabs-margin-left: 7.5em; /* Keep margin for button background */ - --space-before-tabs: 34em; /* Left margin for nav bar */ - --space-after-tabs: 2.3em; /* Right margin for caption button, menu */ -} + /* Touch density */ + :root[uidensity=touch] { + --tabs-margin-left: 7.5em; /* Keep margin for button background */ + --space-before-tabs: 34em; /* Left margin for nav bar */ + --space-after-tabs: 2.3em; /* Right margin for caption button, menu */ + } -/* Normal density */ -:root { - --tabs-margin-left: 6.4em; /* Keep margin for button background */ - --space-before-tabs: 34em; /* Left margin for nav bar */ - --space-after-tabs: 2em; /* Right margin for caption button, menu */ -} + /* Normal density */ + :root { + --tabs-margin-left: 6.4em; /* Keep margin for button background */ + --space-before-tabs: 34em; /* Left margin for nav bar */ + --space-after-tabs: 2em; /* Right margin for caption button, menu */ + } -/* Static values only depending on touch density */ -:root[uidensity=compact] { - --nav-margin-top: -1.9em; - --menu-margin-top: 0.05em; -} + /* Static values only depending on touch density */ + :root[uidensity=compact] { + --nav-margin-top: -1.9em; + --menu-margin-top: 0.05em; + } -:root[uidensity=touch] { - --nav-margin-top: -2.3em; - --menu-margin-top: 0.1em; -} + :root[uidensity=touch] { + --nav-margin-top: -2.3em; + --menu-margin-top: 0.1em; + } -:root { - --nav-margin-top: -2.1em; - --menu-margin-top: 0.15em; -} + :root { + --nav-margin-top: -2.1em; + --menu-margin-top: 0.15em; + } -/* Adjust tab bar to get space first */ -#TabsToolbar { - margin-left: var(--tabs-margin-left) !important; - padding-left: var(--space-before-tabs) !important; - margin-right: var(--space-after-tabs) !important; - margin-bottom: -0.1em; !important; /* Remove bottom border */ -} + /* Adjust tab bar to get space first */ + #TabsToolbar { + margin-left: var(--tabs-margin-left) !important; + padding-left: var(--space-before-tabs) !important; + margin-right: var(--space-after-tabs) !important; + margin-bottom: -0.1em; !important; /* Remove bottom border */ + } -/* Move nav bar to top left */ -#nav-bar { - margin-top: var(--nav-margin-top) !important; /* Move nav bar up */ - margin-right: 60vw !important; /* Cut it off with defined width */ - margin-bottom: -0.1em !important; /* Remove bottom border */ - background-color: transparent !important; /* Make it use tab bar colors */ -} + /* Move nav bar to top left */ + #nav-bar { + margin-top: var(--nav-margin-top) !important; /* Move nav bar up */ + margin-right: 60vw !important; /* Cut it off with defined width */ + margin-bottom: -0.1em !important; /* Remove bottom border */ + background-color: transparent !important; /* Make it use tab bar colors */ + } -/* Move menu button to top right */ -#PanelUI-button { - position: fixed; /* Fixed position for menu */ - top: var(--menu-margin-top); /* Add some margin to top */ - right: 0em; /* Move it to right side (adjust for caption buttons) */ - border-left: none !important; /* Remove menu border */ + /* Move menu button to top right */ + #PanelUI-button { + position: fixed; /* Fixed position for menu */ + top: var(--menu-margin-top); /* Add some margin to top */ + right: 0em; /* Move it to right side (adjust for caption buttons) */ + border-left: none !important; /* Remove menu border */ + } } diff --git a/navbar/move-identity-lock-right.css b/navbar/move-identity-lock-right.css index ec2f130..bdf3698 100644 --- a/navbar/move-identity-lock-right.css +++ b/navbar/move-identity-lock-right.css @@ -5,23 +5,25 @@ * Contributor(s): Madis0, Mart3323 */ -#PopupAutoCompleteRichResult .autocomplete-richlistitem { - padding-inline-start: var(--item-padding-end) !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #PopupAutoCompleteRichResult .autocomplete-richlistitem { + padding-inline-start: var(--item-padding-end) !important; + } -#urlbar > #identity-box -{ - -moz-box-ordinal-group: 99 !important; /* Move identity box to the end */ - border-inline-end: none !important; /* Remove any right borders from it (internal pages, EV SSL) */ - margin-inline-end: 0em !important; /* Remove the end margin */ - margin-inline-start: -0.2em !important; /* Remove the start margin */ -} + #urlbar > #identity-box + { + -moz-box-ordinal-group: 99 !important; /* Move identity box to the end */ + border-inline-end: none !important; /* Remove any right borders from it (internal pages, EV SSL) */ + margin-inline-end: 0em !important; /* Remove the end margin */ + margin-inline-start: -0.2em !important; /* Remove the start margin */ + } -#urlbar > #page-action-buttons > #pageActionButton { - -moz-box-ordinal-group: 99 !important; /* Move the 3-dot page action button to the rightmost of page action icons */ -} + #urlbar > #page-action-buttons > #pageActionButton { + -moz-box-ordinal-group: 99 !important; /* Move the 3-dot page action button to the rightmost of page action icons */ + } -.urlbar-input-box -{ - margin-left: 0.5em !important; /* Add some margin back to left of urlbar to make it prettier */ -} /* If you're using reload-button-addressbar-left.css, set the value to 2em. */ + .urlbar-input-box + { + margin-left: 0.5em !important; /* Add some margin back to left of urlbar to make it prettier */ + } /* If you're using reload-button-addressbar-left.css, set the value to 2em. */ +} diff --git a/navbar/no-page-action-button.css b/navbar/no-page-action-button.css index 15198b1..67a24fb 100644 --- a/navbar/no-page-action-button.css +++ b/navbar/no-page-action-button.css @@ -6,6 +6,8 @@ * Contributor(s): DrPugsley, Madis0 */ -#pageActionButton { - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #pageActionButton { + display: none !important; + } } diff --git a/navbar/overflow-icons-only.css b/navbar/overflow-icons-only.css index f57f502..d14cd21 100644 --- a/navbar/overflow-icons-only.css +++ b/navbar/overflow-icons-only.css @@ -5,12 +5,14 @@ * https://www.reddit.com/r/FirefoxCSS/comments/7iivzf/iconsonly_overflow_menu/ */ -#widget-overflow-fixed-list { +@-moz-document url(chrome://browser/content/browser.xul) { + #widget-overflow-fixed-list { display: grid; /* Display icons in a grid */ grid-template-rows: repeat(1, 1.5em); /* One row with button width 1.5em */ grid-template-columns: repeat(20, 1.5em); /* Twenty columns with button height 1.5em */ -} + } -#widget-overflow-fixed-list .toolbarbutton-1 > .toolbarbutton-text { + #widget-overflow-fixed-list .toolbarbutton-1 > .toolbarbutton-text { display: none !important; /* Hide labels just in case */ + } } diff --git a/navbar/red-addressbar-insecure.css b/navbar/red-addressbar-insecure.css index 167b079..db14ad1 100644 --- a/navbar/red-addressbar-insecure.css +++ b/navbar/red-addressbar-insecure.css @@ -6,23 +6,25 @@ * http://forums.mozillazine.org/viewtopic.php?p=14404121#p14404121 */ -#urlbar { - position: relative; - z-index: 1; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #urlbar { + position: relative; + z-index: 1; + } -#identity-box:after { - content: ''; - position: absolute; - height: 100%; - width: 100%; - top: 0; - left: 0; - z-index: -1; -} + #identity-box:after { + content: ''; + position: absolute; + height: 100%; + width: 100%; + top: 0; + left: 0; + z-index: -1; + } -#urlbar[pageproxystate="valid"] > #identity-box.notSecure:after, -#urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms:after, -#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent:after { - background: red; + #urlbar[pageproxystate="valid"] > #identity-box.notSecure:after, + #urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms:after, + #urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent:after { + background: red; + } } diff --git a/navbar/reload-button-addressbar-left.css b/navbar/reload-button-addressbar-left.css index f9c07b6..32e2591 100644 --- a/navbar/reload-button-addressbar-left.css +++ b/navbar/reload-button-addressbar-left.css @@ -6,14 +6,16 @@ * https://github.com/Timvde/UserChrome-Tweaks/pull/47 */ -#stop-reload-button { - transform: translate(0.4em); /* Makes the reload button "float" 0.3 em to the right */ -} +@-moz-document url(chrome://browser/content/browser.xul) { + #stop-reload-button { + transform: translate(0.4em); /* Makes the reload button "float" 0.3 em to the right */ + } -#urlbar-container { - margin-left: -1.95em; /* Makes the address bar "move" under reload button to the left */ -} + #urlbar-container { + margin-left: -1.95em; /* Makes the address bar "move" under reload button to the left */ + } -#identity-box { - margin-left: 1.4em; /* Adds some margin to the identity box to create space for the reload button */ + #identity-box { + margin-left: 1.4em; /* Adds some margin to the identity box to create space for the reload button */ + } } diff --git a/navbar/reload-stop-throbber.css b/navbar/reload-stop-throbber.css index 6d0f9aa..0044d44 100644 --- a/navbar/reload-stop-throbber.css +++ b/navbar/reload-stop-throbber.css @@ -4,10 +4,12 @@ * Contributor(s): Madis0 */ -#stop-reload-button:not([animate]) > #stop-button { +@-moz-document url(chrome://browser/content/browser.xul) { + #stop-reload-button:not([animate]) > #stop-button { list-style-image: url("chrome://browser/skin/tabbrowser/tab-loading.png") !important; /* Show throbber after the reload-to-stop animation, until stop-to-reload animation */ -} + } -#stop-reload-button > #stop-button:hover { - list-style-image: url("chrome://browser/skin/stop.svg") !important; /* Show stop button on hover */ + #stop-reload-button > #stop-button:hover { + list-style-image: url("chrome://browser/skin/stop.svg") !important; /* Show stop button on hover */ + } } diff --git a/navbar/remove-back-button-circle.css b/navbar/remove-back-button-circle.css index 5dc11d3..5f2788a 100644 --- a/navbar/remove-back-button-circle.css +++ b/navbar/remove-back-button-circle.css @@ -4,24 +4,26 @@ * Contributor(s): Skrity */ -:root:not([uidensity="compact"]) #back-button > .toolbarbutton-icon { - background-color: unset !important; - border: unset !important; - padding: var(--toolbarbutton-inner-padding) !important; - border-radius: var(--toolbarbutton-border-radius) !important; - width: calc(2 * var(--toolbarbutton-inner-padding) + 16px) !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + :root:not([uidensity="compact"]) #back-button > .toolbarbutton-icon { + background-color: unset !important; + border: unset !important; + padding: var(--toolbarbutton-inner-padding) !important; + border-radius: var(--toolbarbutton-border-radius) !important; + width: calc(2 * var(--toolbarbutton-inner-padding) + 16px) !important; + } -/* Hover and Active states to mimic other buttons */ -:root:not([uidensity="compact"]) #back-button:hover:not([disabled]) > .toolbarbutton-icon { - background-color: var(--toolbarbutton-hover-background) !important; -} + /* Hover and Active states to mimic other buttons */ + :root:not([uidensity="compact"]) #back-button:hover:not([disabled]) > .toolbarbutton-icon { + background-color: var(--toolbarbutton-hover-background) !important; + } -:root:not([uidensity="compact"]) #back-button:active:not([disabled]) > .toolbarbutton-icon { - background-color: var(--toolbarbutton-active-background) !important; -} + :root:not([uidensity="compact"]) #back-button:active:not([disabled]) > .toolbarbutton-icon { + background-color: var(--toolbarbutton-active-background) !important; + } -/* Remove pre-padding */ -:root:not([uidensity="compact"]) #back-button { - padding-inline-start: 3px !important; + /* Remove pre-padding */ + :root:not([uidensity="compact"]) #back-button { + padding-inline-start: 3px !important; + } } diff --git a/navbar/right-pageaction-separator.css b/navbar/right-pageaction-separator.css index 66280c1..d07e204 100644 --- a/navbar/right-pageaction-separator.css +++ b/navbar/right-pageaction-separator.css @@ -8,8 +8,10 @@ * Contributor(s): Madis0 */ -#urlbar > #page-action-buttons > #pageActionButton { - border-inline-end: 1px solid var(--urlbar-separator-color); /* Add a permanent border (separator) to the right of it */ - border-image: linear-gradient(transparent 15%, var(--urlbar-separator-color) 15%, var(--urlbar-separator-color) 85%, transparent 85%); /* Separator properties like original */ - border-image-slice: 1; /* Don't make it full-height */ +@-moz-document url(chrome://browser/content/browser.xul) { + #urlbar > #page-action-buttons > #pageActionButton { + border-inline-end: 1px solid var(--urlbar-separator-color); /* Add a permanent border (separator) to the right of it */ + border-image: linear-gradient(transparent 15%, var(--urlbar-separator-color) 15%, var(--urlbar-separator-color) 85%, transparent 85%); /* Separator properties like original */ + border-image-slice: 1; /* Don't make it full-height */ + } } diff --git a/navbar/sharpen-edges.css b/navbar/sharpen-edges.css index 9b358b4..f35611a 100644 --- a/navbar/sharpen-edges.css +++ b/navbar/sharpen-edges.css @@ -4,7 +4,8 @@ * Contributor(s): DrPugsley */ -:root { - --toolbarbutton-border-radius: 0px !important; +@-moz-document url(chrome://browser/content/browser.xul) { + :root { + --toolbarbutton-border-radius: 0px !important; + } } - diff --git a/navbar/switch-identity-lock.css b/navbar/switch-identity-lock.css index e4f8de4..6b25945 100644 --- a/navbar/switch-identity-lock.css +++ b/navbar/switch-identity-lock.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0 */ -#identity-box { - direction: rtl; +@-moz-document url(chrome://browser/content/browser.xul) { + #identity-box { + direction: rtl; + } } diff --git a/sidebar/auto-hide-sidebar.css b/sidebar/auto-hide-sidebar.css index 75aa7aa..6980317 100644 --- a/sidebar/auto-hide-sidebar.css +++ b/sidebar/auto-hide-sidebar.css @@ -6,40 +6,42 @@ /* To right-align the sidebar, replace all occurrences of "left" with "right", and "margin-right" with "margin-left" */ -:root { - --sidebar-hover-width: 10px; - --sidebar-visible-width: 200px; -} - -#sidebar-box { - position: relative !important; - overflow-x: hidden !important; - margin-right: calc(var(--sidebar-hover-width) * -1) !important; - left: var(--sidebar-hover-width) !important; - min-width: var(--sidebar-hover-width) !important; - max-width: var(--sidebar-hover-width) !important; -} - -#sidebar-box:hover { - margin-right: calc(var(--sidebar-visible-width) * -1) !important; - left: var(--sidebar-visible-width) !important; - min-width: var(--sidebar-visible-width) !important; - max-width: var(--sidebar-visible-width) !important; -} - -#sidebar { - opacity: 0 !important; -} - -#sidebar:hover { - opacity: 1 !important; -} - -/* #sidebar-header is hidden by default, change "none" to "inherit" to restore it. */ -#sidebar-header { - display: none !important; -} - -/* #sidebar-splitter styles the divider between the sidebar and the rest of the browser. */ -#sidebar-splitter { +@-moz-document url(chrome://browser/content/browser.xul) { + :root { + --sidebar-hover-width: 10px; + --sidebar-visible-width: 200px; + } + + #sidebar-box { + position: relative !important; + overflow-x: hidden !important; + margin-right: calc(var(--sidebar-hover-width) * -1) !important; + left: var(--sidebar-hover-width) !important; + min-width: var(--sidebar-hover-width) !important; + max-width: var(--sidebar-hover-width) !important; + } + + #sidebar-box:hover { + margin-right: calc(var(--sidebar-visible-width) * -1) !important; + left: var(--sidebar-visible-width) !important; + min-width: var(--sidebar-visible-width) !important; + max-width: var(--sidebar-visible-width) !important; + } + + #sidebar { + opacity: 0 !important; + } + + #sidebar:hover { + opacity: 1 !important; + } + + /* #sidebar-header is hidden by default, change "none" to "inherit" to restore it. */ + #sidebar-header { + display: none !important; + } + + /* #sidebar-splitter styles the divider between the sidebar and the rest of the browser. */ + #sidebar-splitter { + } } diff --git a/sidebar/hide-sidebar-header.css b/sidebar/hide-sidebar-header.css index 800d5dd..2de9593 100644 --- a/sidebar/hide-sidebar-header.css +++ b/sidebar/hide-sidebar-header.css @@ -7,6 +7,8 @@ * Contributor(s): Chris Morgan */ -#sidebar-header { - display: none; +@-moz-document url(chrome://browser/content/browser.xul) { + #sidebar-header { + display: none; + } } diff --git a/sidebar/sidebar-no-close-button.css b/sidebar/sidebar-no-close-button.css index 6ae4f79..225c977 100644 --- a/sidebar/sidebar-no-close-button.css +++ b/sidebar/sidebar-no-close-button.css @@ -4,6 +4,8 @@ * Contributor(s): Dmitry Sergeenkov */ -#sidebar-close { - visibility: collapse; +@-moz-document url(chrome://browser/content/browser.xul) { + #sidebar-close { + visibility: collapse; + } } diff --git a/sidebar/sidebar-title-to-bottom.css b/sidebar/sidebar-title-to-bottom.css index becc449..0292076 100644 --- a/sidebar/sidebar-title-to-bottom.css +++ b/sidebar/sidebar-title-to-bottom.css @@ -4,10 +4,12 @@ * Contributor(s): Dmitry Sergeenkov */ -#sidebar-box { - -moz-box-direction: reverse; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #sidebar-box { + -moz-box-direction: reverse; + } -#sidebar-switcher-arrow { - transform: rotate(180deg); + #sidebar-switcher-arrow { + transform: rotate(180deg); + } } diff --git a/tabs/1px-padding-over-tabs.css b/tabs/1px-padding-over-tabs.css index 8f31bc6..572e3c0 100644 --- a/tabs/1px-padding-over-tabs.css +++ b/tabs/1px-padding-over-tabs.css @@ -3,7 +3,9 @@ * * Contributor(s): BubiBalboa via reddit.com/user/marciiF */ - -#TabsToolbar { - padding-top: 1px !important; + +@-moz-document url(chrome://browser/content/browser.xul) { + #TabsToolbar { + padding-top: 1px !important; + } } diff --git a/tabs/close-button-hover.css b/tabs/close-button-hover.css index 72aa03d..7ba62ed 100644 --- a/tabs/close-button-hover.css +++ b/tabs/close-button-hover.css @@ -4,10 +4,12 @@ * Contributor(s): Timvde */ -.tabbrowser-tab:not([selected]):not([pinned]) .tab-close-button { - display: none !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + .tabbrowser-tab:not([selected]):not([pinned]) .tab-close-button { + display: none !important; + } -.tabbrowser-tab:not([selected]):not([pinned]):hover .tab-close-button { - display: -moz-box !important; + .tabbrowser-tab:not([selected]):not([pinned]):hover .tab-close-button { + display: -moz-box !important; + } } diff --git a/tabs/grayscale-favicon.css b/tabs/grayscale-favicon.css index d8908d0..c00af16 100644 --- a/tabs/grayscale-favicon.css +++ b/tabs/grayscale-favicon.css @@ -4,6 +4,8 @@ * Contributor(s): Madis0, Timvde */ -tab .tab-icon, .tab-icon-image { - filter: grayscale(1) brightness(0.5) contrast(1) invert(1); /* Remove invert(1) to make it dark */ +@-moz-document url(chrome://browser/content/browser.xul) { + tab .tab-icon, .tab-icon-image { + filter: grayscale(1) brightness(0.5) contrast(1) invert(1); /* Remove invert(1) to make it dark */ + } } diff --git a/tabs/hide-favicons.css b/tabs/hide-favicons.css index c6144b0..f8a7a1e 100644 --- a/tabs/hide-favicons.css +++ b/tabs/hide-favicons.css @@ -4,7 +4,8 @@ * Contributor(s): Madis0 */ -.tabbrowser-tab:not([busy="true"]):not([pinned]) .tab-icon-image -{ - display: none !important; +@-moz-document url(chrome://browser/content/browser.xul) { + .tabbrowser-tab:not([busy="true"]):not([pinned]) .tab-icon-image { + display: none !important; + } } diff --git a/tabs/hide-tabs-linux-titlebar.css b/tabs/hide-tabs-linux-titlebar.css index f92b652..a6397a6 100644 --- a/tabs/hide-tabs-linux-titlebar.css +++ b/tabs/hide-tabs-linux-titlebar.css @@ -9,6 +9,8 @@ * Contributor(s): Isaac-Newt */ -#TabsToolbar { - visibility: collapse !important; +@-moz-document url(chrome://browser/content/browser.xul) { + #TabsToolbar { + visibility: collapse !important; + } } diff --git a/tabs/hide-tabs-macos.css b/tabs/hide-tabs-macos.css index 3a02c7e..f069597 100644 --- a/tabs/hide-tabs-macos.css +++ b/tabs/hide-tabs-macos.css @@ -8,35 +8,37 @@ * Contributor(s): Isaac-Newt, Ivan0xFF */ -#TabsToolbar { - height: 22px !important; - visibility: collapse; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #TabsToolbar { + height: 22px !important; + visibility: collapse; + } -.tabbrowser-tabs { - height: 22px !important; - visibility: collapse; -} + .tabbrowser-tabs { + height: 22px !important; + visibility: collapse; + } -#tabbrowser-tabs { - visibility: collapse; - height: 22px !important; -} + #tabbrowser-tabs { + visibility: collapse; + height: 22px !important; + } -#nav-bar{ - border-top-width: 0px !important; -} + #nav-bar{ + border-top-width: 0px !important; + } -/* Position window controls */ -#titlebar-buttonbox-container { - margin-left: 5px !important; - margin-top: 5px !important; -} + /* Position window controls */ + #titlebar-buttonbox-container { + margin-left: 5px !important; + margin-top: 5px !important; + } -/* - * Make room for window controls. - * Only apply this style when not in fullscreen mode. - */ -#main-window:not([inFullscreen]) #nav-bar{ - padding: 0px 5px 0px 75px !important; + /* + * Make room for window controls. + * Only apply this style when not in fullscreen mode. + */ + #main-window:not([inFullscreen]) #nav-bar{ + padding: 0px 5px 0px 75px !important; + } } diff --git a/tabs/hide-tabs-windows.css b/tabs/hide-tabs-windows.css index 6103692..36a3fab 100644 --- a/tabs/hide-tabs-windows.css +++ b/tabs/hide-tabs-windows.css @@ -9,32 +9,34 @@ * Contributor(s): Ivan0xFF */ -#TabsToolbar { - visibility: collapse !important; -} - -#titlebar-buttonbox { - height: 40px !important; -} - -#nav-bar { - margin-top: -40px; - margin-right: 140px; - box-shadow: none !important; -} - -[uidensity="compact"]:root #titlebar-buttonbox { - height: 32px !important; -} - -[uidensity="compact"]:root #nav-bar { - margin-top: -32px; -} - -#titlebar-spacer { - background-color: var(--chrome-secondary-background-color); -} - -#titlebar-buttonbox-container { - background-color: var(--chrome-secondary-background-color); +@-moz-document url(chrome://browser/content/browser.xul) { + #TabsToolbar { + visibility: collapse !important; + } + + #titlebar-buttonbox { + height: 40px !important; + } + + #nav-bar { + margin-top: -40px; + margin-right: 140px; + box-shadow: none !important; + } + + [uidensity="compact"]:root #titlebar-buttonbox { + height: 32px !important; + } + + [uidensity="compact"]:root #nav-bar { + margin-top: -32px; + } + + #titlebar-spacer { + background-color: var(--chrome-secondary-background-color); + } + + #titlebar-buttonbox-container { + background-color: var(--chrome-secondary-background-color); + } } diff --git a/tabs/material-design.css b/tabs/material-design.css index 540a69f..b1889e3 100644 --- a/tabs/material-design.css +++ b/tabs/material-design.css @@ -7,18 +7,20 @@ * Contributor(s): Madis0 */ -.tabbrowser-tab[visuallyselected="true"] { - color: inherit !important; /* Use background tab text color for foreground tabs */ -} +@-moz-document url(chrome://browser/content/browser.xul) { + .tabbrowser-tab[visuallyselected="true"] { + color: inherit !important; /* Use background tab text color for foreground tabs */ + } -.tab-background[selected=true] { - background-color: transparent !important; /* Make selected tab bg transparent */ -} + .tab-background[selected=true] { + background-color: transparent !important; /* Make selected tab bg transparent */ + } -.tab-line { - -moz-box-ordinal-group: 2; /* Move the line to the bottom */ -} + .tab-line { + -moz-box-ordinal-group: 2; /* Move the line to the bottom */ + } -.tab-line[selected=true] { - background-color: white !important; /* Make the line white, remove this for default color */ + .tab-line[selected=true] { + background-color: white !important; /* Make the line white, remove this for default color */ + } } diff --git a/tabs/more-compact-tabs.css b/tabs/more-compact-tabs.css index f253a7b..0e1a50c 100644 --- a/tabs/more-compact-tabs.css +++ b/tabs/more-compact-tabs.css @@ -5,16 +5,18 @@ * Contributor(s): DrPugsley */ -[uidensity="compact"]:root { - --tab-min-height: 22px !important; - --newtab-margin: -3px 0 -3px -3px !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + [uidensity="compact"]:root { + --tab-min-height: 22px !important; + --newtab-margin: -3px 0 -3px -3px !important; + } -.tabbrowser-tab { - max-height: var(--tab-min-height) !important; -} + .tabbrowser-tab { + max-height: var(--tab-min-height) !important; + } -.tabs-newtab-button{ - margin: var(--newtab-margin) !important; -} + .tabs-newtab-button{ + margin: var(--newtab-margin) !important; + } +} diff --git a/tabs/prevent-tab-overflow.css b/tabs/prevent-tab-overflow.css index b75b0e1..85eb02c 100644 --- a/tabs/prevent-tab-overflow.css +++ b/tabs/prevent-tab-overflow.css @@ -6,7 +6,9 @@ * Original by Jeremy Sturdivant (https://superuser.com/a/238435) -- CC BY-SA */ -.tabbrowser-tab { - min-width: 1em !important; - clip-width: 1em !important; +@-moz-document url(chrome://browser/content/browser.xul) { + .tabbrowser-tab { + min-width: 1em !important; + clip-width: 1em !important; + } } diff --git a/tabs/remove-borders.css b/tabs/remove-borders.css index e10204b..dd8b762 100644 --- a/tabs/remove-borders.css +++ b/tabs/remove-borders.css @@ -3,11 +3,13 @@ * * Contributor(s): Madis0 */ - -.tabbrowser-tab::after, .tabbrowser-tab::before { - border-left: none !important; /* Remove borders from inactive tabs */ -} -:root { - --tabs-border: transparent !important; /* Remove borders from active tab and below tabs */ +@-moz-document url(chrome://browser/content/browser.xul) { + .tabbrowser-tab::after, .tabbrowser-tab::before { + border-left: none !important; /* Remove borders from inactive tabs */ + } + + :root { + --tabs-border: transparent !important; /* Remove borders from active tab and below tabs */ + } } diff --git a/tabs/remove-padding-when-not-maximized-macOS-Windows.css b/tabs/remove-padding-when-not-maximized-macOS-Windows.css index 77084b3..ba52bda 100644 --- a/tabs/remove-padding-when-not-maximized-macOS-Windows.css +++ b/tabs/remove-padding-when-not-maximized-macOS-Windows.css @@ -6,34 +6,36 @@ * Contributor(s): Gacel Perfinian */ -/* - * Instead of hiding the padding, you can adjust the padding. - * As of Firefox Quantum, it is set at around 40 pixels - * (the exact amount depends on the specific theming done and - * the operating system). - * To override, instead of placing display:none - * use width: Xpx !important; - * or width: Xem !important; - */ +@-moz-document url(chrome://browser/content/browser.xul) { + /* + * Instead of hiding the padding, you can adjust the padding. + * As of Firefox Quantum, it is set at around 40 pixels + * (the exact amount depends on the specific theming done and + * the operating system). + * To override, instead of placing display:none + * use width: Xpx !important; + * or width: Xem !important; + */ -.titlebar-placeholder[type="pre-tabs"] { - display:none !important; -} + .titlebar-placeholder[type="pre-tabs"] { + display:none !important; + } -/* Unless you have a specific problem - * (for example, having a very small screen) - * this should be left as-is. Only uncomment - * it when the benefit is better than the side effects. - * Reported side effects including undraggable windows - * and lost new tab button. - * Note that if your display is RTL, the above code should - * still work. - */ + /* Unless you have a specific problem + * (for example, having a very small screen) + * this should be left as-is. Only uncomment + * it when the benefit is better than the side effects. + * Reported side effects including undraggable windows + * and lost new tab button. + * Note that if your display is RTL, the above code should + * still work. + */ -/* + /* -.titlebar-placeholder[type="post-tabs"] { - display:none !important; -} + .titlebar-placeholder[type="post-tabs"] { + display:none !important; + } -*/ + */ +} diff --git a/tabs/sound-indicator-to-the-left.css b/tabs/sound-indicator-to-the-left.css index cc5f2a9..61c89b7 100644 --- a/tabs/sound-indicator-to-the-left.css +++ b/tabs/sound-indicator-to-the-left.css @@ -6,44 +6,45 @@ * Contributor(s): BubiBalboa via reddit.com/user/marciiF */ - -.tab-icon-sound { - -moz-box-ordinal-group: 0 !important; - border-radius: 50% !important; - margin: initial !important; - margin-right: -16px !important; - opacity: 1 !important; - transform: translate(35%, -35%) !important; -} - -.tab-icon-sound:hover { - background-color: var(--toolbar-bgcolor) !important; -} - -.tab-close-button { - -moz-box-ordinal-group: 2 !important; -} - -.tab-icon-sound[soundplaying] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio") !important; -} - -.tab-icon-sound[muted] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-muted") !important; -} - -.tab-icon-sound[activemedia-blocked] { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked") !important; -} - -.tab-icon-sound[soundplaying]:-moz-lwtheme-brighttext { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white") !important; -} - -.tab-icon-sound[muted]:-moz-lwtheme-brighttext { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-muted") !important; -} - -.tab-icon-sound[activemedia-blocked]:-moz-lwtheme-brighttext { - list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-blocked") !important; +@-moz-document url(chrome://browser/content/browser.xul) { + .tab-icon-sound { + -moz-box-ordinal-group: 0 !important; + border-radius: 50% !important; + margin: initial !important; + margin-right: -16px !important; + opacity: 1 !important; + transform: translate(35%, -35%) !important; + } + + .tab-icon-sound:hover { + background-color: var(--toolbar-bgcolor) !important; + } + + .tab-close-button { + -moz-box-ordinal-group: 2 !important; + } + + .tab-icon-sound[soundplaying] { + list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio") !important; + } + + .tab-icon-sound[muted] { + list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-muted") !important; + } + + .tab-icon-sound[activemedia-blocked] { + list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked") !important; + } + + .tab-icon-sound[soundplaying]:-moz-lwtheme-brighttext { + list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white") !important; + } + + .tab-icon-sound[muted]:-moz-lwtheme-brighttext { + list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-muted") !important; + } + + .tab-icon-sound[activemedia-blocked]:-moz-lwtheme-brighttext { + list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-blocked") !important; + } } diff --git a/tabs/tab-line-colors.css b/tabs/tab-line-colors.css index bd1d386..3b69be5 100644 --- a/tabs/tab-line-colors.css +++ b/tabs/tab-line-colors.css @@ -8,14 +8,16 @@ * Contributor(s): Isaac-Newt */ -.tabbrowser-tab[usercontextid] .tab-line{ - background-color:var(--identity-tab-color)!important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + .tabbrowser-tab[usercontextid] .tab-line{ + background-color:var(--identity-tab-color)!important; + } -.tabbrowser.tab[usercontextid] .tab-line { - background:var(--identity-tab-color) !important; -} + .tabbrowser.tab[usercontextid] .tab-line { + background:var(--identity-tab-color) !important; + } -.tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-bottom-line { - background: none !important; + .tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-bottom-line { + background: none !important; + } } diff --git a/tabs/tabs-on-bottom-macOS.css b/tabs/tabs-on-bottom-macOS.css index 6baa74d..1822658 100644 --- a/tabs/tabs-on-bottom-macOS.css +++ b/tabs/tabs-on-bottom-macOS.css @@ -8,44 +8,46 @@ * Contributor(s): Isaac-Newt, Ivan0xFF */ -/*Tabs On Bottom*/ -#TabsToolbar { - -moz-box-ordinal-group: 2; -} - -#nav-bar{ - border-top-width: 0px !important; -} - -/*Remove extra tab bar space*/ -#TabsToolbar { - padding-inline-start: 0px !important; - margin-bottom: none !important; -} - -#titlebar-placeholder-on-TabsToolbar-for-captions-buttons { - display: none; -} - -.box-inherit .scrollbox-innerbox { - margin-right: 0 !important; -} - -#TabsToolbar .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox { - padding-inline-start: 0px !important; - padding-inline-end: 0px !important; -} - -/* Position window controls */ -#titlebar-buttonbox-container { - margin-left: 5px !important; - margin-top: 5px !important; -} - -/* - * Make room for window controls. - * Only apply this style when not in fullscreen mode. - */ -#main-window:not([inFullscreen]) #nav-bar{ - padding: 0px 5px 0px 75px !important; +@-moz-document url(chrome://browser/content/browser.xul) { + /*Tabs On Bottom*/ + #TabsToolbar { + -moz-box-ordinal-group: 2; + } + + #nav-bar{ + border-top-width: 0px !important; + } + + /*Remove extra tab bar space*/ + #TabsToolbar { + padding-inline-start: 0px !important; + margin-bottom: none !important; + } + + #titlebar-placeholder-on-TabsToolbar-for-captions-buttons { + display: none; + } + + .box-inherit .scrollbox-innerbox { + margin-right: 0 !important; + } + + #TabsToolbar .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox { + padding-inline-start: 0px !important; + padding-inline-end: 0px !important; + } + + /* Position window controls */ + #titlebar-buttonbox-container { + margin-left: 5px !important; + margin-top: 5px !important; + } + + /* + * Make room for window controls. + * Only apply this style when not in fullscreen mode. + */ + #main-window:not([inFullscreen]) #nav-bar{ + padding: 0px 5px 0px 75px !important; + } } diff --git a/tabs/tabs-on-bottom-titlebar.css b/tabs/tabs-on-bottom-titlebar.css index f603752..85bec7f 100644 --- a/tabs/tabs-on-bottom-titlebar.css +++ b/tabs/tabs-on-bottom-titlebar.css @@ -8,16 +8,18 @@ * Contributor(s): Isaac-Newt */ -/* Tabs On Bottom */ -#TabsToolbar { - -moz-box-ordinal-group: 2; -} +@-moz-document url(chrome://browser/content/browser.xul) { + /* Tabs On Bottom */ + #TabsToolbar { + -moz-box-ordinal-group: 2; + } -#nav-bar{ - border-top-width: 0px !important; -} + #nav-bar{ + border-top-width: 0px !important; + } -/* Bookmarks Bar fix */ -#PersonalToolbar { - -moz-box-ordinal-group: 2; + /* Bookmarks Bar fix */ + #PersonalToolbar { + -moz-box-ordinal-group: 2; + } } diff --git a/tabs/underline-pending-tabs.css b/tabs/underline-pending-tabs.css index 1ab208e..a01931a 100644 --- a/tabs/underline-pending-tabs.css +++ b/tabs/underline-pending-tabs.css @@ -4,7 +4,9 @@ * Contributor(s): josemam */ -.tabbrowser-tab[pending] { - text-decoration: underline; - opacity: .5; +@-moz-document url(chrome://browser/content/browser.xul) { + .tabbrowser-tab[pending] { + text-decoration: underline; + opacity: .5; + } } diff --git a/tabs/x-on-left.css b/tabs/x-on-left.css index f6d7f37..c2a887e 100644 --- a/tabs/x-on-left.css +++ b/tabs/x-on-left.css @@ -3,14 +3,17 @@ * * Contributor(s): April93 */ -#TabsToolbar .tab-close-button { - -moz-box-ordinal-group: 0 !important; - margin-left: -6px !important; - border-radius: 2px !important; - transition: opacity 200ms !important; -} -#TabsToolbar .tab-icon-image:not([pinned]) -{ - margin-left: 2px; +@-moz-document url(chrome://browser/content/browser.xul) { + #TabsToolbar .tab-close-button { + -moz-box-ordinal-group: 0 !important; + margin-left: -6px !important; + border-radius: 2px !important; + transition: opacity 200ms !important; + } + + #TabsToolbar .tab-icon-image:not([pinned]) + { + margin-left: 2px; + } } diff --git a/toolbars/auto-hide.css b/toolbars/auto-hide.css index 98f18c6..7e66f71 100644 --- a/toolbars/auto-hide.css +++ b/toolbars/auto-hide.css @@ -4,108 +4,110 @@ * Contributor(s): Alex Vallat */ -:root[uidensity=compact] #navigator-toolbox { - --nav-bar-height: 33px; - --tab-min-height: 29px; -} - -:root:not([uidensity]) #navigator-toolbox { - --nav-bar-height: 39px; - --tab-min-height: 33px; -} - -:root[uidensity=touch] #navigator-toolbox { - --nav-bar-height: 41px; - --tab-min-height: 41px; -} - -#navigator-toolbox { - --tabbar-height: calc(var(--tab-min-height) + var(--space-above-tabbar)); - --trigger-area-height: 5px; -} - -:root[chromehidden~="toolbar"] #navigator-toolbox { - --tabbar-height: 0.1px; -} - -#toolbar-menubar { - margin-top: 0px !important; /* This is usually 0, but under Win7 can be given an extra 1px when not maximized */ -} - -/* Undo add of 4px extra margin on top of the tabs toolbar on Windows 7. */ -/* Note: @media -moz-os-version does not work in userChrome.css (https://bugzilla.mozilla.org/show_bug.cgi?id=1418963) */ -:root[sizemode="normal"][chromehidden~="menubar"] #TabsToolbar, -:root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar { - padding-top: var(--space-above-tabbar) !important; -} - -#nav-bar, #PersonalToolbar { - /* Otherwise spacers will not count as hover-able areas */ +@-moz-document url(chrome://browser/content/browser.xul) { + :root[uidensity=compact] #navigator-toolbox { + --nav-bar-height: 33px; + --tab-min-height: 29px; + } + + :root:not([uidensity]) #navigator-toolbox { + --nav-bar-height: 39px; + --tab-min-height: 33px; + } + + :root[uidensity=touch] #navigator-toolbox { + --nav-bar-height: 41px; + --tab-min-height: 41px; + } + + #navigator-toolbox { + --tabbar-height: calc(var(--tab-min-height) + var(--space-above-tabbar)); + --trigger-area-height: 5px; + } + + :root[chromehidden~="toolbar"] #navigator-toolbox { + --tabbar-height: 0.1px; + } + + #toolbar-menubar { + margin-top: 0px !important; /* This is usually 0, but under Win7 can be given an extra 1px when not maximized */ + } + + /* Undo add of 4px extra margin on top of the tabs toolbar on Windows 7. */ + /* Note: @media -moz-os-version does not work in userChrome.css (https://bugzilla.mozilla.org/show_bug.cgi?id=1418963) */ + :root[sizemode="normal"][chromehidden~="menubar"] #TabsToolbar, + :root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar { + padding-top: var(--space-above-tabbar) !important; + } + + #nav-bar, #PersonalToolbar { + /* Otherwise spacers will not count as hover-able areas */ -moz-window-dragging: default; -} - -:root:not([customizing]) #nav-bar -{ - overflow-y: hidden; - max-height:0; - min-height:0 !important; - padding-top:0 !important; - padding-bottom:0 !important; - opacity: 0; -} - -:root:not([customizing]) :hover > #nav-bar, -:root:not([customizing]) #nav-bar:focus-within { - max-height: var(--nav-bar-height); - opacity: 1; - transition: opacity 0.15s ease-in, max-height 0.15s linear; -} - -:root:not([customizing]) #navigator-toolbox { - max-height: calc(var(--tabbar-height) + var(--trigger-area-height)); - min-height: var(--tabbar-height); - margin-bottom: calc(-1 * var(--trigger-area-height)); -} - -:root:not([customizing]) #navigator-toolbox:hover, -:root:not([customizing]) #navigator-toolbox:focus-within { - max-height: calc(var(--tabbar-height) + var(--nav-bar-height)); - margin-bottom: calc(0px - var(--nav-bar-height)); -} - -/* If the bookmarks bar is turned on, auto-hide that too */ -:root:not([customizing]) #PersonalToolbar { - max-height: 0 !important; - min-height: 0.1px !important; - opacity: 0; - transition: opacity 0.15s ease-in !important; -} - -:root:not([customizing]) :hover > #PersonalToolbar, -:root:not([customizing]) #navigator-toolbox:focus-within #PersonalToolbar { - max-height: 4em !important; - opacity: 1; -} - -/* Lightweight Theme Support */ -:root:-moz-lwtheme #nav-bar, -:root:-moz-lwtheme #PersonalToolbar { - background-color: var(--lwt-accent-color) !important; - background-image: var(--lwt-header-image), var(--lwt-additional-images) !important; - background-position: var(--lwt-background-alignment) !important; - background-repeat: var(--lwt-background-tiling) !important; -} - -#main-window[sizemode="normal"]:-moz-lwtheme #nav-bar { + } + + :root:not([customizing]) #nav-bar + { + overflow-y: hidden; + max-height:0; + min-height:0 !important; + padding-top:0 !important; + padding-bottom:0 !important; + opacity: 0; + } + + :root:not([customizing]) :hover > #nav-bar, + :root:not([customizing]) #nav-bar:focus-within { + max-height: var(--nav-bar-height); + opacity: 1; + transition: opacity 0.15s ease-in, max-height 0.15s linear; + } + + :root:not([customizing]) #navigator-toolbox { + max-height: calc(var(--tabbar-height) + var(--trigger-area-height)); + min-height: var(--tabbar-height); + margin-bottom: calc(-1 * var(--trigger-area-height)); + } + + :root:not([customizing]) #navigator-toolbox:hover, + :root:not([customizing]) #navigator-toolbox:focus-within { + max-height: calc(var(--tabbar-height) + var(--nav-bar-height)); + margin-bottom: calc(0px - var(--nav-bar-height)); + } + + /* If the bookmarks bar is turned on, auto-hide that too */ + :root:not([customizing]) #PersonalToolbar { + max-height: 0 !important; + min-height: 0.1px !important; + opacity: 0; + transition: opacity 0.15s ease-in !important; + } + + :root:not([customizing]) :hover > #PersonalToolbar, + :root:not([customizing]) #navigator-toolbox:focus-within #PersonalToolbar { + max-height: 4em !important; + opacity: 1; + } + + /* Lightweight Theme Support */ + :root:-moz-lwtheme #nav-bar, + :root:-moz-lwtheme #PersonalToolbar { + background-color: var(--lwt-accent-color) !important; + background-image: var(--lwt-header-image), var(--lwt-additional-images) !important; + background-position: var(--lwt-background-alignment) !important; + background-repeat: var(--lwt-background-tiling) !important; + } + + #main-window[sizemode="normal"]:-moz-lwtheme #nav-bar { background-position-y: calc(-2px - var(--tabbar-height)) !important; -} -#main-window[sizemode="normal"]:-moz-lwtheme #PersonalToolbar { + } + #main-window[sizemode="normal"]:-moz-lwtheme #PersonalToolbar { background-position-y: calc(-2px - var(--tabbar-height) - var(--nav-bar-height)) !important; -} + } -#main-window[sizemode="maximized"]:-moz-lwtheme #nav-bar { + #main-window[sizemode="maximized"]:-moz-lwtheme #nav-bar { background-position-y: calc(-8px - var(--tabbar-height)) !important; -} -#main-window[sizemode="maximized"]:-moz-lwtheme #PersonalToolbar { + } + #main-window[sizemode="maximized"]:-moz-lwtheme #PersonalToolbar { background-position-y: calc(-8px - var(--tabbar-height) - var(--nav-bar-height)) !important; + } } diff --git a/toolbars/compact-toolbars.css b/toolbars/compact-toolbars.css index 234f7dc..545c347 100644 --- a/toolbars/compact-toolbars.css +++ b/toolbars/compact-toolbars.css @@ -6,21 +6,23 @@ * Contributor(s): Alex Vallat */ -:root[uidensity=compact] #urlbar, -:root[uidensity=compact] .searchbar-textbox { - font-size: unset !important; - min-height: 24px !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + :root[uidensity=compact] #urlbar, + :root[uidensity=compact] .searchbar-textbox { + font-size: unset !important; + min-height: 24px !important; + } -:root[uidensity=compact] #identity-box { - max-height: 22px; -} + :root[uidensity=compact] #identity-box { + max-height: 22px; + } -:root[uidensity=compact] #nav-bar .toolbarbutton-1 { - padding: 0px !important; -} + :root[uidensity=compact] #nav-bar .toolbarbutton-1 { + padding: 0px !important; + } -/* Compatibility with auto-hide.css */ -:root[uidensity=compact] #navigator-toolbox { - --nav-bar-height: 31px !important; + /* Compatibility with auto-hide.css */ + :root[uidensity=compact] #navigator-toolbox { + --nav-bar-height: 31px !important; + } } diff --git a/toolbars/faviconized-bookmarks.css b/toolbars/faviconized-bookmarks.css index d79e568..1607bf9 100644 --- a/toolbars/faviconized-bookmarks.css +++ b/toolbars/faviconized-bookmarks.css @@ -7,12 +7,14 @@ * Contributor(s): Okamoi */ -/* Hides bookmark text for all bookmarks displayed in a toolbar */ -.bookmark-item > .toolbarbutton-text { - display: none !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + /* Hides bookmark text for all bookmarks displayed in a toolbar */ + .bookmark-item > .toolbarbutton-text { + display: none !important; + } -/* Small visual tweak so it looks exactly the same as if the bookmark really had no text */ -.bookmark-item > .toolbarbutton-icon { - margin-inline-end: 0px !important; + /* Small visual tweak so it looks exactly the same as if the bookmark really had no text */ + .bookmark-item > .toolbarbutton-icon { + margin-inline-end: 0px !important; + } } diff --git a/toolbars/show-bookmarks-only-on-newtab.css b/toolbars/show-bookmarks-only-on-newtab.css index a693862..0a9f682 100644 --- a/toolbars/show-bookmarks-only-on-newtab.css +++ b/toolbars/show-bookmarks-only-on-newtab.css @@ -8,14 +8,16 @@ * https://www.reddit.com/r/FirefoxCSS/comments/7evwow/show_bookmarks_toolbar_only_on_new_tab/ */ -#main-window #PersonalToolbar { - visibility: collapse !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #main-window #PersonalToolbar { + visibility: collapse !important; + } -#main-window[title^="about:newtab"] #PersonalToolbar, -#main-window[title^="New Tab"] #PersonalToolbar, -#main-window[title^="Nightly"] #PersonalToolbar, -#main-window[title^="Mozilla Firefox"] #PersonalToolbar, -#main-window[title^="Firefox"] #PersonalToolbar { - visibility: visible !important; + #main-window[title^="about:newtab"] #PersonalToolbar, + #main-window[title^="New Tab"] #PersonalToolbar, + #main-window[title^="Nightly"] #PersonalToolbar, + #main-window[title^="Mozilla Firefox"] #PersonalToolbar, + #main-window[title^="Firefox"] #PersonalToolbar { + visibility: visible !important; + } } diff --git a/toolbars/sliding-bookmarks-bar.css b/toolbars/sliding-bookmarks-bar.css index f0c9cc3..0aae08b 100644 --- a/toolbars/sliding-bookmarks-bar.css +++ b/toolbars/sliding-bookmarks-bar.css @@ -6,26 +6,28 @@ * License: CC BY-NC-SA (https://creativecommons.org/licenses/by-nc-sa/4.0/) */ -#nav-bar ~ #PersonalToolbar:not([customizing]) { - position: fixed !important; - padding: 3px 2px 2px !important; - height: auto !important; - border-top: 0px solid transparent!important; - border-right: 1px solid transparent !important; - border-bottom: 1px solid rgba(0,0,0,0.3) !important; - border-left: 1px solid transparent !important; - box-shadow: 0 0px 2px rgba(0,0,0,0); - width: 100%; - transform: translateY(-100%); - transition: transform 0.2s !important; -} +@-moz-document url(chrome://browser/content/browser.xul) { + #nav-bar ~ #PersonalToolbar:not([customizing]) { + position: fixed !important; + padding: 3px 2px 2px !important; + height: auto !important; + border-top: 0px solid transparent!important; + border-right: 1px solid transparent !important; + border-bottom: 1px solid rgba(0,0,0,0.3) !important; + border-left: 1px solid transparent !important; + box-shadow: 0 0px 2px rgba(0,0,0,0); + width: 100%; + transform: translateY(-100%); + transition: transform 0.2s !important; + } -#navigator-toolbox:hover > -#nav-bar ~ #PersonalToolbar:not([customizing]) { - transform: translateY(0); -} + #navigator-toolbox:hover > + #nav-bar ~ #PersonalToolbar:not([customizing]) { + transform: translateY(0); + } -#toolbar-menubar:not([inactive="true"]) ~ -#nav-bar ~ #PersonalToolbar:not([customizing]) { - transform: translateY(0); + #toolbar-menubar:not([inactive="true"]) ~ + #nav-bar ~ #PersonalToolbar:not([customizing]) { + transform: translateY(0); + } } diff --git a/toolbars/vertical-toolbar-right-side.css b/toolbars/vertical-toolbar-right-side.css index 2c106a9..176392c 100644 --- a/toolbars/vertical-toolbar-right-side.css +++ b/toolbars/vertical-toolbar-right-side.css @@ -6,86 +6,89 @@ * * Contributor(s): erlotinib */ -:root { - /* The space between the top of the window and - * the beginning of the toolbar may change - * between OS/density/... - * This variable may need to be adjusted in - * order to have the bar at the right place - */ - --space-from-top-of-window: 80px; -} -/* ---------------- */ -/* - * Code from Faviconized Bookmarks from Okamoi - */ +@-moz-document url(chrome://browser/content/browser.xul) { + :root { + /* The space between the top of the window and + * the beginning of the toolbar may change + * between OS/density/... + * This variable may need to be adjusted in + * order to have the bar at the right place + */ + --space-from-top-of-window: 80px; + } -#PersonalToolbar .bookmark-item > .toolbarbutton-text { - display: none !important; -} + /* ---------------- */ + /* + * Code from Faviconized Bookmarks from Okamoi + */ -#PersonalToolbar .bookmark-item > .toolbarbutton-icon { - margin-inline-end: 0px !important; -} -/* ---------------- */ + #PersonalToolbar .bookmark-item > .toolbarbutton-text { + display: none !important; + } -/* Create space in the window for the toolbar */ -#browser, #browser-bottombox { - margin-right: 35px!important; -} + #PersonalToolbar .bookmark-item > .toolbarbutton-icon { + margin-inline-end: 0px !important; + } + /* ---------------- */ -#PersonalToolbar, #personal-bookmarks { - padding: 0!important; - margin: 0!important; -} + /* Create space in the window for the toolbar */ + #browser, #browser-bottombox { + margin-right: 35px!important; + } -/* Hide the toolbar when in fullscreen mode */ -#main-window[inFullscreen="true"] #PersonalToolbar { - visibility: collapse !important; -} + #PersonalToolbar, #personal-bookmarks { + padding: 0!important; + margin: 0!important; + } -#main-window[inFullscreen="true"] #browser, -#main-window[inFullscreen="true"] #browser-bottombox { - margin-right: 0!important; -} + /* Hide the toolbar when in fullscreen mode */ + #main-window[inFullscreen="true"] #PersonalToolbar { + visibility: collapse !important; + } -#PersonalToolbar { - position: fixed!important; - /* - * We place the toolbar below the url-bar and menu bar - * 0 is the top of firefox's interface - */ - top: var(--space-from-top-of-window)!important; - right:35px; - height: 35px!important; - width: 100%!important; - /* turns the personnalToolbar on its side to a vertical orientation */ - transform-origin: top right!important; - transform: rotate(-90deg)!important; -} + #main-window[inFullscreen="true"] #browser, + #main-window[inFullscreen="true"] #browser-bottombox { + margin-right: 0!important; + } -#personal-bookmarks { - height: 100%!important; - width: 100%!important; - /* - * To have the icons in the original order, - * rotate the list of bookmarks 180° - */ - transform: rotate(-180deg)!important; - transform-origin: 50% 50%!important; -} + #PersonalToolbar { + position: fixed!important; + /* + * We place the toolbar below the url-bar and menu bar + * 0 is the top of firefox's interface + */ + top: var(--space-from-top-of-window)!important; + right:35px; + height: 35px!important; + width: 100%!important; + /* turns the personnalToolbar on its side to a vertical orientation */ + transform-origin: top right!important; + transform: rotate(-90deg)!important; + } -#personal-bookmarks .bookmark-item { - /* - * Icons are on their side due to the 90° rotation. - * Put them back with a rotation, 90° CCW - */ - transform: rotate(-90deg)!important; - /* - * Modify width to change space between icon, the value cannot - * be greater than the height of #PersonnalToolbar - */ - width: 35px!important; - margin-top:0!important; + #personal-bookmarks { + height: 100%!important; + width: 100%!important; + /* + * To have the icons in the original order, + * rotate the list of bookmarks 180° + */ + transform: rotate(-180deg)!important; + transform-origin: 50% 50%!important; + } + + #personal-bookmarks .bookmark-item { + /* + * Icons are on their side due to the 90° rotation. + * Put them back with a rotation, 90° CCW + */ + transform: rotate(-90deg)!important; + /* + * Modify width to change space between icon, the value cannot + * be greater than the height of #PersonnalToolbar + */ + width: 35px!important; + margin-top:0!important; + } }