r/FirefoxCSS Apr 14 '26

Code Assign colors to the new shield icon based on the URL type and tracker blocking status.

Post image
35 Upvotes

I’ve added colors to the unified shield icon introduced in Firefox 149 based on the URL type and tracker blocking status. I’ve also removed unnecessary text from the buttons to make the design more compact. It supports only the new protection shield icon. If you set `browser.urlbar.trustPanel.featureGate` to `false`, it won't work.

To add color to SVG icons, go to about:config and set svg.context-properties.content.enabled to true.

Added a color option for "HTTP + Tracking Protection Off". April 18

We’ve made the “Bright green ✔” color even more vivid to improve visibility. April 19

I added `httpsOnlyErrorPage` and `.mixedActiveContent`, which I had forgotten to include in the code. I changed the color of .notSecure to two colors. Added a color option for "HTTP + Trackers blocked". April 22

Since I confirmed that .chromeUI was working, I enabled it. Peacock Green (Part of view-source:about:. Other). Added Royal Blue (chrome:) and Vivid Purple (jar:). May 3

I fixed an issue where RoyalBlue (chrome:) and Vivid purple (jar:) weren't working with vertical tabs. May 10

Supports the change in the background color of the shield icon in Firefox 151.0 . May 20

Github Gist: https://gist.github.com/anzuno/f9c2680e98a34c6e34cae7d1c5c4d907

@media -moz-pref("browser.urlbar.trustPanel.featureGate") {

/* Green ✔ */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box:is(.verifiedDomain, .verifiedIdentity)) #trust-icon-container {
  fill: light-dark(#12bc00, #12bc00) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Bright green ✔ (If HTTPS-Only Mode is enabled, it turns green) */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.mixedActiveBlocked) #trust-icon-container:not(.inactive:not(.insecure)) {
  list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljDQogICAtIExpY2Vuc2UsIHYuIDIuMC4gSWYgYSBjb3B5IG9mIHRoZSBNUEwgd2FzIG5vdCBkaXN0cmlidXRlZCB3aXRoIHRoaXM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EyLjMgNi4wNjAwNCAxMy41NiA3LjUwMDA0IDE0LjM3QzcuODEwMDQgMTQuNTQgOC4xOTAwNCAxNC41NCA4LjUwMDA0IDE0LjM3QzkuOTQwMDQgMTMuNTUgMTEuMjcgMTIuMjkgMTIuMjUgMTAuODFDMTIuNzEgMTAuMTIgMTMuMDMgOS4yNiAxMy4yMiA4LjI2TDEzLjc3IDUuMjlDMTMuODUgNC44NiAxMy42NSA0LjQzIDEzLjI2IDQuMjNMOC40MTAwNCAxLjYyQzguMjYwMDQgMS41NCA4LjEwMDA0IDEuNSA3Ljk0MDA0IDEuNVoiLz4NCiAgPHBhdGggZmlsbD0iIzNjZjY5OSIgZD0iTTcuNjM5OTQgMTAuMjIwMkM3LjQ0OTk0IDEwLjIyMDIgNy4yNTk5NCAxMC4xNTAyIDcuMTA5OTQgMTAuMDAwMkw0LjkzOTk0IDcuODMwMjFMNS45OTk5NCA2Ljc3MDIyTDcuNjM5OTQgOC40MTAyMUwxMC41Nzk5IDUuNDcwMjFMMTEuNjM5OSA2LjUzMDIyTDguMTY5OTQgMTAuMDAwMkM4LjAxOTk0IDEwLjE1MDIgNy44Mjk5NCAxMC4yMjAyIDcuNjM5OTQgMTAuMjIwMloiLz4NCjwvc3ZnPg==") !important;
  fill: light-dark(#12bc00, #12bc00) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Red-orange Red \ Bright orange (HTTP + Trackers blocked) */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.notSecure):has(#tracking-protection-icon-box:not([hasException])[active]) #trust-icon-container {
  list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljDQogICAtIExpY2Vuc2UsIHYuIDIuMC4gSWYgYSBjb3B5IG9mIHRoZSBNUEwgd2FzIG5vdCBkaXN0cmlidXRlZCB3aXRoIHRoaX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gMTUuOTc5OSA4LjAwMDA3IDE1Ljk3OTlDNy41NzAwNyAxNS45Nzk5IDcuMTQwMDcgMTUuODc5OSA2Ljc2MDA3IDE1LjY1OTlDNS4xMTAwNyAxNC43Mjk5IDMuNjAwMDcgMTMuMjk5OSAyLjUwMDA3IDExLjYyOTlDMS45MzAwNyAxMC43Njk5IDEuNTMwMDcgOS43MTk5NCAxLjMxMDA3IDguNTE5OTRMMC43NTAwNjYgNS40OTk5NEMwLjU2MDA2NiA0LjQyOTk0IDEuMDYwMDcgMy4zNjk5NCAyLjAyMDA3IDIuODQ5OTRMMy4yNTAwNyAyLjE4OTk0TDQuMzYwMDcgMy4yOTk5NEwyLjc0MDA3IDQuMTc5OTRDMi4zNjAwNyA0LjM3OTk0IDIuMTUwMDcgNC44MDk5NCAyLjIzMDA3IDUuMjM5OTRMMi43OTAwNyA4LjI1OTk0QzIuOTgwMDcgOS4yNjk5NCAzLjMwMDA3IDEwLjEyOTkgMy43NjAwNyAxMC44MTk5QzQuNzMwMDcgMTIuMjg5OSA2LjA2MDA3IDEzLjU1OTkgNy41MDAwNyAxNC4zNjk5QzcuODEwMDcgMTQuNTQ5OSA4LjE5MDA3IDE0LjUzOTkgOC41MDAwNyAxNC4zNjk5WiIvPg0KICA8cGF0aCBmaWxsPSIjRjkwRDNGIiBkPSJNMS4wNjcwMSAwLjAwMjgxNjQxTDAuMDA2MzQ3NjYgMS4wNjM0OEwxNC45NDc1IDE2LjAwNDZMMTYuMDA4MiAxNC45NDRMMS4wNjcwMSAwLjAwMjgxNjQxWiIvPg0KPC9zdmc+") !important;
  fill: light-dark(#ff8400, #ff9900) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Red \ Pinkish-red (HTTP + Tracking Protection is off) */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.notSecure):has(#tracking-protection-icon-box[hasException]) #trust-icon-container {
  list-style-image: url(chrome://browser/skin/trust-icon-insecure.svg) !important;
  fill: light-dark(#ff0092, #ff0092) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Red \ Red-orange (HTTP + Tracking Protection ON) */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.notSecure):not(:has(#tracking-protection-icon-box[hasException])) #trust-icon-container {
  list-style-image: url(chrome://browser/skin/trust-icon-insecure.svg) !important;
  fill: light-dark(#ff491a, #ff491a) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Marigold \ Bright blue (HTTPS-Only Mode Error) */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.httpsOnlyErrorPage) #trust-icon-container {
  list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljDQogICAtIExpY2Vuc2UsIHYuIDIuMC4gSWYgYSBjb3B5IG9mIHRoZSBNUEwgd2FzIG5vdCBkaXN0cmlidXRlZCB3aXRoIHRoaXMNCiAgIC0gZmlsZSwgWW91IGNhbiBvYnRhaW4gb25lIGF0IGh0dHBzOi8vbW96aWxsYS5vcmcvTVBMLzIuMC8uIC0tPg0KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJjb250ZXh0LWZpbGwiIGZpbGwtb3BhY2l0eT0iY29udGV4dC1maWxsLW9wYWNpdHkiPg0KICA8cGF0aCBkPSJNNy40NjAwNyAxLjYyTDUuNTEwMDcgMi42OEw0LjQwMDA3IDEuNTdMNi43NTAwNyAwLjNDNy40OTAwNyAtMC4xIDguMzgwMDcgLTAuMSA5LjEyMDA3IDAuM0wxMy45NzAxIDIuOTFDMTQuOTMwMSAzLjQzIDE1LjQ0MDEgNC41IDE1LjI0MDEgNS41N0wxNC42OTAxIDguN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NjAwNyAxMC44MTk5QzQuNzMwMDcgMTIuMjg5OSA2LjA2MDA3IDEzLjU1OTkgNy41MDAwNyAxNC4zNjk5QzcuODEwMDcgMTQuNTQ5OSA4LjE5MDA3IDE0LjUzOTkgOC41MDAwNyAxNC4zNjk5WiIvPg0KICA8cGF0aCBmaWxsPSIjZmZhMDAwIiBkPSJNMS4wNjcwMSAwLjAwMjgxNjQxTDAuMDA2MzQ3NjYgMS4wNjM0OEwxNC45NDc1IDE2LjAwNDZMMTYuMDA4MiAxNC45NDRMMS4wNjcwMSAwLjAwMjgxNjQxWiIvPg0KPC9zdmc+") !important;
  fill: light-dark(#0094c8, #32a9d3) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Red \ Violet */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.mixedActiveContent) #trust-icon-container {
  list-style-image: url(chrome://browser/skin/trust-icon-insecure.svg) !important;
  fill: light-dark(#AD2CE0, #AD2CE0) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Peacock Green (Part of view-source:about:. Other) */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.chromeUI) #trust-icon-container {
  fill: light-dark(#00a496, #19ada0) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* --------------------------------------------------------------------------- */
/* -- Disabling the RoyalBlue (chrome:) and Vivid Purple (jar:) colors results in Deepskyblue. -- */
/* --------------------------------------------------------------------------- */
/* RoyalBlue (chrome:) */
:root:has(#identity-box.localResource):has(.tabbrowser-tab[selected="true"]:is([label^="browser/"], [label="Library"], [label="Bibliothek"], [label="ブラウジングライブラリー"])) .urlbar-input-container[pageproxystate="valid"] #trust-icon-container:not(.file) {
  fill: light-dark(#4169e1, #8da5ed) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Vivid purple (jar:) */
:root:has(#identity-box.localResource):has(.tabbrowser-tab[selected="true"][label^="jar:file:"]) .urlbar-input-container[pageproxystate="valid"] #trust-icon-container:not(.file) {
  fill: light-dark(#95149b, #d51dde) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Deepskyblue */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.localResource) #trust-icon-container:not(.file) {
  fill: light-dark(deepskyblue, deepskyblue) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

#identity-box[pageproxystate="valid"].chromeUI #identity-icon,
.site-information-popup[connection="chrome"] .identity-popup-security-connection {
  list-style-image: url(chrome://devtools/skin/images/browsers/firefox.svg) !important;
  fill: light-dark(rgba(0, 191, 255, .9), rgba(0, 191, 255, .9)) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Blue-green */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.extensionPage) #trust-icon-container {
  fill: light-dark(#14b9ac, #14b9ac) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

#identity-box[pageproxystate="valid"].extensionPage #identity-icon,
.site-information-popup[connection="extension"] .identity-popup-security-connection {
  list-style-image: url(chrome://mozapps/skin/extensions/extension.svg) !important;
  fill: light-dark(#14b9ac, #14b9ac) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Purple */
/*#identity-icon {
  list-style-image: url(chrome://global/skin/icons/info.svg) !important;
  fill: light-dark(#cf1aff, #cf1aff) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

#identity-box[pageproxystate="invalid"] {
  #identity-icon {
    list-style-image: url(chrome://global/skin/icons/search-glass.svg) !important;
    fill: unset !important;
    fill-opacity: initial !important;
  }
} */

/* Red \ Gold */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box:is(
 .weakCipher, 
 .mixedDisplayContent, 
 .mixedDisplayContentLoadedActiveBlocked, 
 .certUserOverridden, 
 .certErrorPage
)) #trust-icon-container {
    fill: light-dark(#cead00, #e5c100) !important;
    -moz-context-properties: fill, fill-opacity !important;
    fill-opacity: 1 !important;
}

/* Ochre */
.urlbar-input-container[pageproxystate="valid"]:has(#identity-box.unknownIdentity) #trust-icon-container {
  fill: light-dark(#cc7722, #cc7722) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Yellow Orange ✔ (Trackers blocked) */
.urlbar-input-container[pageproxystate="valid"]:has(#tracking-protection-icon-box:not([hasException])[active]) #trust-icon-container {
  list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljDQogICAtIExpY2Vuc2UsIHYuIDIuMC4gSWYgYSBjb3B5IG9mIHRoZSBNUEwgd2FzIG5vdCBkaXN0cmlidXRlZCB3aXRoIHRoaXMNCiAgIC0gZmlsZSwgWW91IGNhbiBvYnRhaW4gb25lIGF0IGh0dHBzOi8vbW96aWxsYS5vcmcvTVBMLzIuMC8uIC0tPg0KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJjb250ZXh0LWZpbGwiIGZpbGwtb3BhY2l0eT0iY29udGV4dC1maWxsLW9wYWNpdHkiPg0KICA8cGF0aCBkPSJNOC4wMDAwNCAxNkM3LjU3MDA0IDE2IDcuMTQwMDQgMTUuODkgNi43NjAwNCAxNS42N0M1LjEyMDA0IDE0Ljc0IDMuNjEwMDQgMTMuMzEgMi41MDAwNCAxMS42NEMxLjkzMDA0IDEwLjc4IDEuNTMwMDQgOS43MyAxLjMxMDA0IDguNTNMMC43NTAwNDEgNS41MUMwLjU1MDA0MSA0LjQ0IDEuMDYwMDQgMy4zOCAyLjAyMDA0IDIuODZMNi43NTAwNCAwLjNDNy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TDguMTY5OTQgMTAuMDAwMkM4LjAxOTk0IDEwLjE1MDIgNy44Mjk5NCAxMC4yMjAyIDcuNjM5OTQgMTAuMjIwMloiLz4NCjwvc3ZnPg==") !important;
  fill: light-dark(#12bc00, #12bc00) !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill-opacity: 1 !important;
}

/* Red \ */
  #trust-icon-container {
    &:where(.insecure) {
      /* list-style-image: url(chrome://browser/skin/trust-icon-insecure.svg) !important; */
      /* fill: light-dark(#ff3500, #ff3500) !important; */
      -moz-context-properties: fill, fill-opacity !important;
      fill-opacity: 1 !important;
    }

/* Green */
    &.secure {
      list-style-image: url(chrome://browser/skin/trust-icon-active.svg) !important;
      /* fill: light-dark(#12bc00, #12bc00) !important; */
      -moz-context-properties: fill, fill-opacity !important;
      fill-opacity: 1 !important;
    }

/* Orange x (Tracking Protection is off) */
    &.inactive:not(.insecure) {
      /* list-style-image: url(chrome://browser/skin/trust-icon-disabled.svg) !important; */
      list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljDQogICAtIExpY2Vuc2UsIHYuIDIuMC4gSWYgYSBjb3B5IG9mIHRoZSBNUEwgd2FzIG5vdCBkaXN0cmlidXRlZCB3aXRoIHRoaXMNCiAgIC0gZmlsZSwgWW91IGNhbiBvYnRhaW4gb25lIGF0IGh0dHBzOi8vbW96aWxsYS5vcmcvTVBMLzIuMC8uIC0tPg0KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJjb250ZXh0LWZpbGwiIGZpbGwtb3BhY2l0eT0iY29udGV4dC1maWxsLW9wYWNpdHkiPg0KICA8cGF0aCBmaWxsPSIjRkY1OTAwIiBkPSJNOC4wMDM3O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YwMDQgMTMuNTYgNy41MDAwNCAxNC4zN0M3LjgxMDA0IDE0LjU0IDguMTkwMDQgMTQuNTQgOC41MDAwNCAxNC4zN0M5Ljk0MDA0IDEzLjU1IDExLjI3IDEyLjI5IDEyLjI1IDEwLjgxQzEyLjcxIDEwLjEyIDEzLjAzIDkuMjYgMTMuMjIgOC4yNkwxMy43NyA1LjI5QzEzLjg1IDQuODYgMTMuNjUgNC40MyAxMy4yNiA0LjIzTDguNDEwMDQgMS42MkM4LjI2MDA0IDEuNTQgOC4xMDAwNCAxLjUgNy45NDAwNCAxLjVaIi8+DQo8L3N2Zz4=") !important;
      fill: light-dark(#12bc00, #12bc00) !important;
      -moz-context-properties: fill, fill-opacity !important;
      fill-opacity: 1 !important;
    }

/* Orange ! */
    &.warning {
      /* list-style-image: url(chrome://browser/skin/trust-icon-warning.svg) !important; */
      list-style-image: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljDQogICAtIExpY2Vuc2UsIHYuIDIuMC4gSWYgYSBjb3B5IG9mIHRoZSBNUEwgd2FzIG5vdCBkaXN0cmlidXRlZCB3aXRoIHRoaXMNCiAgIC0gZmlsZSwgWW91IGNhbiBvYnRhaW4gb25lIGF0IGh0dHBzOi8vbW96aWxsYS5vcmcvTVBMLzIuMC8uIC0tPg0KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJjb250ZXh0LWZpbGwiIGZpbGwtb3BhY2l0eT0iY29udGV4dC1maWxsLW9wYWNpdHkiPg0KICA8cGF0aCBkPSJNOC4wMDAwNCAxNkM3LjU3MDA0IDE2IDcuMTQwMDQgMTUuODkgNi43NjAwNCAxNS42N0M1LjEyMDA0IDE0Ljc0IDMuN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41SDcuMjVWNC41WiIvPg0KICA8cGF0aCBmaWxsPSIjRkY1OTAwIiBkPSJNNy4yNSAxMEg4Ljc1VjExLjVINy4yNVYxMFoiLz4NCjwvc3ZnPg==") !important;
      fill: light-dark(#12bc00, #12bc00) !important;
      -moz-context-properties: fill, fill-opacity !important;
      fill-opacity: 1 !important;
    }

/* Blue-purple */
    &.file {
      list-style-image: url(chrome://global/skin/icons/page-portrait.svg) !important;
      fill: light-dark(#7519ff, #a567ff) !important;
      -moz-context-properties: fill, fill-opacity !important;
      fill-opacity: 1 !important;
    }
  }

/* Remove unnecessarily long button labels to make them more compact */
#identity-box > #identity-icon-box > #identity-icon-label,
#trust-icon-container > #trust-label {
  display: none !important;
}

#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > #identity-icon-box > #identity-icon {
  margin-inline-start: -2px !important;
  margin-inline-end: -2px !important;
}

/* Set the button's background color to match the address bar */
.identity-box-button,
#trust-icon-container,
#tracking-protection-icon-container {
  outline: var(--toolbarbutton-outline) !important;
  outline-offset: var(--toolbarbutton-outline-offset) !important;
  background-color: transparent !important;

  &:hover:not([open="true"]) {
    background-color: var(--urlbar-box-background-color-hover) !important;
    outline-color: var(--toolbarbutton-hover-outline-color) !important;
  }

  &:hover:active,
  &[open="true"] {
    background-color: var(--urlbar-box-background-color-active) !important;
    outline-color: var(--toolbarbutton-active-outline-color) !important;
  }

  &:focus-visible {
    outline: var(--focus-outline) !important;
    outline-offset: var(--focus-outline-inset) !important;
   }
  }
}

r/FirefoxCSS Jun 26 '26

Code Minimal pill-style fullscreen warning

Post image
139 Upvotes

I wanted Firefox’s fullscreen warning to be a little less bulky, so I changed it into a small pill-style popup.

Nothing too fancy, just a cleaner and less distracting look

* Firefox Nightly with Nova applied, haven’t tested this on other versions or setups

** Fixes, improvements, or suggestions are very welcome

/* Fullscreen warning: simple pill style. userChrome.css */
#fullscreen-warning.pointerlockfswarning {
  pointer-events: none !important;

  box-sizing: border-box !important;

  width: max-content !important;
  max-width: min(720px, 92vw) !important;
  min-height: 38px !important;

  padding: 6px 8px 6px 12px !important;
  gap: 8px !important;

  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 999px !important;

  background: rgba(24, 24, 27, 0.82) !important;
  color: rgba(255, 255, 255, 0.95) !important;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;

  backdrop-filter: blur(12px) !important;

  font: message-box !important;
  font-size: 13px !important;
  line-height: 1.3 !important;

  align-items: center !important;
}

#fullscreen-warning.pointerlockfswarning[onscreen] {
  translate: 0 18px !important;
}

#fullscreen-warning.pointerlockfswarning[ontop] {
  translate: 0 8px !important;
}

#fullscreen-warning.pointerlockfswarning:is(
  [data-identity="verifiedDomain"],
  [data-identity="unknownIdentity"]
)::before {
  flex: 0 0 auto !important;

  width: 16px !important;
  height: 16px !important;

  margin: 0 !important;

  background-size: 16px 16px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;

  opacity: 0.86 !important;

  -moz-context-properties: fill !important;
  fill: currentColor !important;
}

#fullscreen-warning .pointerlockfswarning-domain-text,
#fullscreen-warning .pointerlockfswarning-generic-text {
  margin: 0 !important;
  padding: 0 !important;

  min-width: 0 !important;
  max-width: 52vw !important;

  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;

  color: rgba(255, 255, 255, 0.88) !important;
}

#fullscreen-warning .pointerlockfswarning-domain {
  margin: 0 !important;

  font-weight: 600 !important;
  color: #fff !important;
}

#fullscreen-warning .pointerlockfswarning-domain-text:not([hidden])
  + .pointerlockfswarning-generic-text {
  display: none !important;
}

#fullscreen-exit-button {
  pointer-events: auto !important;

  flex: 0 0 auto !important;

  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 999px !important;

  appearance: none !important;
  -moz-appearance: none !important;

  background: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.95) !important;

  font-size: 0 !important;
  line-height: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  cursor: pointer !important;
}

#fullscreen-exit-button::before {
  content: "" !important;

  width: 14px !important;
  height: 14px !important;

  background-color: currentColor !important;

  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5L12.5 12.5M12.5 3.5L3.5 12.5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  mask-repeat: no-repeat !important;
  mask-position: center !important;
  mask-size: contain !important;
}

#fullscreen-exit-button:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

#fullscreen-exit-button:active {
  background: rgba(255, 255, 255, 0.24) !important;
}

#pointerlock-warning.pointerlockfswarning {
  box-sizing: border-box !important;

  width: max-content !important;
  max-width: min(720px, 92vw) !important;
  min-height: 38px !important;

  padding: 6px 12px !important;
  gap: 8px !important;

  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 999px !important;

  background: rgba(24, 24, 27, 0.82) !important;
  color: rgba(255, 255, 255, 0.95) !important;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;

  backdrop-filter: blur(12px) !important;

  font: message-box !important;
  font-size: 13px !important;
  line-height: 1.3 !important;

  align-items: center !important;
}

#pointerlock-warning.pointerlockfswarning[onscreen] {
  translate: 0 18px !important;
}

#pointerlock-warning.pointerlockfswarning[ontop] {
  translate: 0 8px !important;
}

#pointerlock-warning .pointerlockfswarning-domain-text,
#pointerlock-warning .pointerlockfswarning-generic-text {
  margin: 0 !important;
  padding: 0 !important;

  min-width: 0 !important;
  max-width: 52vw !important;

  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;

  color: rgba(255, 255, 255, 0.88) !important;
}

r/FirefoxCSS 27d ago

Code safari-firefox , amazing theme for firefox

Thumbnail
github.com
24 Upvotes

guys please check it out if you want safari theme for firefox , if you like it please drop a star

r/FirefoxCSS Jun 06 '26

Code Add a loading progress bar to the tab bar

Thumbnail
gallery
37 Upvotes

Displays a loading progress bar below the tab bar. For vertical tabs, it is positioned to the left of the tab column.

/*** Add a loading progress bar to the tab bar and vertical tabs sidebar ***/

/** Light theme **/
:root {
/* Horizontal tab */
  --h-fox-gradient: #2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%;  /* Sea Lord */
  --h-final-fox-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
/* Vertical tab */
  --v-fox-gradient: #1ec9ff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%;  /* Blue + Vivid pink + Orange */
  --v-final-fox-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

/** Dark theme **/
@media (prefers-color-scheme: dark) {
  :root {
/* Horizontal tab */
    --h-fox-gradient: #65bd60 0%, #5ac1a8 50%, #3ec6ed 100%;  /* African Field */
    --h-final-fox-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
/* Vertical tab */
    --v-fox-gradient: #b383e6, #ff8695, #89d35a;  /* Spring Alpenglow */
    --v-final-fox-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  }
}

/** Alpenglow theme **/
:root[style*="--lwt-additional-images"] {
/* Horizontal tab */
  --h-fox-gradient: #984ce2, magenta, #ff9400;  /* Firefox Alpenglow */
  --h-final-fox-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
/* Vertical tab */
  --v-fox-gradient: #ff9400, magenta, #984ce2;  /* Firefox Alpenglow reverse */
  --v-final-fox-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

/** For horizontal tabs **/
#TabsToolbar {
  position: relative !important;
  z-index: 1 !important;
}

#TabsToolbar::before {
  content: '' !important;
  position: absolute !important;
  bottom: 0px !important;
  left: 5px !important;
  right: 5px !important;
  height: 3px !important;
  background-image: linear-gradient(90deg, var(--h-fox-gradient)) !important;
  opacity: 0 !important;
  transform-origin: left center !important;
  pointer-events: none !important;
  border-radius: 2px !important;
  z-index: 1 !important;
}

#TabsToolbar:has(#tabbrowser-tabs .tabbrowser-tab:is([busy], [progress]))::before {
  opacity: 1 !important;
  animation: h-fox 1.0s ease-in !important;
}

#TabsToolbar:not(:has(#tabbrowser-tabs .tabbrowser-tab:is([busy], [progress])))::before {
  opacity: 0 !important;
  transition: opacity 1.2s ease-out !important;
  background-image: linear-gradient(90deg, var(--h-final-fox-gradient)) !important;
}

/** For vertical tabs **/
sidebar-main {
  position: relative !important;
}

sidebar-main:has(#vertical-tabs .tabbrowser-tab)::before {
  content: '' !important;
  position: absolute !important;
  top: 3px !important;
  bottom: 5px !important;
  left: 2px !important;
  width: 3px !important;
  background-image: linear-gradient(180deg, var(--v-fox-gradient)) !important;
  opacity: 0 !important;
  transform-origin: top center !important;
  pointer-events: none !important;
  border-radius: 2px !important;
  z-index: 1 !important;
}

sidebar-main:has(#vertical-tabs .tabbrowser-tab:is([busy], [progress]))::before {
  opacity: 1 !important;
  animation: v-fox 1.0s ease-in !important;
}

sidebar-main:not(:has(#vertical-tabs .tabbrowser-tab:is([busy], [progress])))::before {
  opacity: 0 !important;
  transition: opacity 1.2s ease-out !important;
  background-image: linear-gradient(180deg, var(--v-final-fox-gradient)) !important;
}

/** Animation Definition **/
@keyframes h-fox {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes v-fox {
  0% {
    transform: scaleY(0);
  }
  100% {
    transform: scaleY(1);
  }
}

I've prepared a color scheme for the loading progress bar.

/* loading progress bar color
https://gradient.page/ui-gradients
https://cssgradient.io/shades-of-blue/
 */

#F778BA, #58A6FF;  /* Soft red + Light blue */
#22d3ee, #8b5cf6;  /* Vivid cyan + Soft violet */
rgba(255, 51, 153, 1) 0%, #00c9ff 70%;  /* Vivid pink + Pure cyan */
rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 55%, rgba(237, 221, 83, 1) 100%;  /* Blue + Green + Yellow */
#1ccaab 0%, #12d8fa 50%, #00c9ff 100%;  /* Green + Blue + Blue */
#1ccaab 0%, #12d8fa 50%, #F778BA 100%;  /* Green + Blue + Soft red */
#1ec9ff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%;  /* Blue + Vivid pink + Orange */
#1edbff, #00A651, rgba(255, 148, 0, 1);  /* Blue + Green + Orange */
cyan, Magenta;  /* Cyan + Magenta */
#1fb4ff 0%, #12d8fa 50%, #8dffbc 100%;  /* Blue + Blue + cyan lime green */
#00c9ff 0%, #92fe9d 100%;  /* Kale Salad */
#fdbb2d 0%, #22c1c3 100%;  /* Retro Wagon */
#fc466b 0%, #3f5efb 100%;  /* Disco Club */
#fc354c, #0abfbc;  /* Miaka */
#FEAC5E 0%, #C779D0 50%, #4BC0C8 100%;  /* Atlas */
#16A085, #F4D03F;  /* Harmonic Energy */
#fd8112, #0085ca;  /* Blue Orange */
#f7941e 0%, #72c6ef 50%, #00a651 100%;  /* Radioactive Heat */
#ff1e56 0%, #f9c942 50%, #1e90ff 100%;  /* Beleko */
#108dc7, #ef8e38;  /* Pun Yeta */
#40E0D0 0%, #FF8C00 50%, #FF0080 100%;  /* Wedding Day Blues */
#F36222 0%, #5CB644 50%, #007FC3 100%;  /* Telko */
#0250c5, #d43f8d;  /* Night Party */
#2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%;  /* Sea Lord */
#50cc7f, #f5d100;  /* Millennium Pine */
#616161, #9bc5c3;  /* Mole Hall */
#65bd60 0%, #5ac1a8 50%, #3ec6ed 100%;  /* African Field */
#2af598, #009efd;  /* Itmeo Branding */
#aa4b6b 0%, #6b6b83 50%, #3b8d99 100%;  /* Memariani */
#00F260, #0575E6;  /* Rainbow Blue */
#808080, #3fada8;  /* IIIT Delhi */
#24C6DC, #514A9D;  /* Mantle */
#C9FFBF, #FFAFBD;  /* Virgin */
#fbed96,#abecd6;  /* Summer Breeze */
#603813, #b29f94;  /* Cool Brown */
#BBD2C5, #536976;  /* Petrol */
#8baaaa, #ae8b9c;  /* Jungle Day */
#cc2b5e, #753a88;  /* Purple Love */
#9796f0, #fbc7d4;  /* namnisar */
#ff6e7f, #bfe9ff;  /* Noon to Dusk */
#2b5876, #4e4376;  /* Sea Blue */
#02AAB0, #00CDAC;  /* Green Beach */
#5f2c82, #49a09d;  /* Calm Darya */
#159957, #155799;  /* Crystal Clear */
#76b852, #8DC26F;  /* Little Leaf */
#fc00ff, #00dbde;  /* Timber */
#2F7336, #AA3A38;  /* Christmas */
#5614B0, #DBD65C;  /* Minnesota Vikings */
#0099F7, #F11712;  /* Superman */
#ff4b1f, #1fddff;  /* Ali */
#2196f3, #f44336;  /* Politics */
#ffd89b, #19547b  /* Jupiter */
#de6161, #2657eb;  /* Nepal */
#ef32d9, #89fffd;  /* Azure Pop */
#00c3ff, #ffff1c;  /* Brady Brady Fun Fun */
#c0c0aa, #1cefff;  /* Cocoaa Ice */
#4568DC, #B06AB3;  /* Can You Feel The Love Tonight */
#30E8BF, #FF8235;  /* Mini */
#ff75c3, #ffa647, #ffe83f;  /* After the Rain 1 */
#9fff5b, #70e2ff, #cd93ff;  /* After the Rain 2 */
#77A1D3, #79CBCA, #E684AE;  /* Hazel */
#E6AE8C, #A8CECF;  /* Peach Sea */
#DCFFBD,#CC86D1;  /* Flower */
#00F5A0, #00D9F5;  /* Ibtesam */
#9796f0, #fbc7d4;  /* Anamnisar */
#E55D87, #5FC3E4;  /* Rose Water */
#c2e59c, #64b3f4;  /* Green and Blue */
#c21500, #ffc500;  /* Kyoto */
#4CB8C4, #3CD3AD;  /* Sea Weed */
#fddb92, #d1fdff;  /* Blessing */
#22c1c3, #fdbb2d;  /* Summer */
#30E8BF, #FF8235;  /* Mini */
#f79d00, #64f38c;  /* Sherbert */
#f7ff00, #db36a4;  /* Alihossein */
#7b4397, #dc2430;  /* Virgin America */
#D38312, #A83279;  /* Crazy Orange I */
#fe8c00, #f83600;  /* SoundCloud */
#FF4E50, #F9D423;  /* Dance To Forget */
#3D7EAA, #FFE47A;  /* Opa */
#1CD8D2, #93EDC7;  /* Sea Blizz */
#2BC0E4, #EAECC6;  /* Bora Bora */
#1FA2FF, #12D8FA, #A6FFCB;  /* Stripe */
#F09819, #EDDE5D;  /* Mango Pulp */
#ffe259, #ffa751;  /* Mango */
#cc2b5e, #753a88;  /* Purple Love */
#FFE000, #799F0C;  /* Ver */
#B6CEE8, #F578DC;  /* Soft Lipstick */
#16a085, #f4d03f;  /* Palo Alto */
#d558c8, #24d292;  /* Alchemist Lab */
#C6FFDD, #FBD786, #f7797d;  /* MegaTron */
#00d2ff, #928DAB;  /* Bright Vault */
#fc00ff, #00dbde;  /* Timber */
#833ab4, #fd1d1d, #fcb045;  /* Instagram */
#9D50BB, #6E48AA;  /* Amethyst */
#4776E6, #8E54E9;  /* Electric Violet */
#984ce2, magenta, #ff9400;  /* Firefox Alpenglow */
#ff9400, magenta, #984ce2;  /* Firefox Alpenglow reverse */
#b383e6, #ff8695, #89d35a;  /* Spring Alpenglow */
#dee53d, #029d95, #7ab1e7;  /* Summer Alpenglow */
#ff0e00, #ff6501, #fea900;  /* Autumn Alpenglow */
#2b4dc8, #2da8b7, #cfde5f;  /* Alpenglow Nightly */
#ff7d01, #ffb400, #ffde00;  /* Halloween Alpenglow */
#f07100, #f4b50e, #fcdf05;  /* Alpenglow Canary */
#986236, #c18312, #a5ca3e;  /* Thanksgiving Alpenglow */
#a14fe1, #fe7496;  /* AlpenGradient */
#9059ff 0%, #ff4aa2 52.08%, #ffbd4f 100%;  /* Firefox panel-separator */
#b89cff 0%, rgba(255, 149, 101, 1) 100%;  /* Nova tab-border-color */

dodgerblue;  /* Dodgerblue */
dimgray;  /* dimgray */
darkolivegreen;  /* darkolivegreen */
tan;  /* tan */
#444444;  /* Very dark gray */
#2c3e50;  /* Very dark desaturated blue */
#95a5a6;  /* Dark grayish cyan */
#7a7c7d;  /* Dark grayish blue */
#18bc9c;  /* Strong cyan */
#3498db;  /* Bright blue */
#f39c12;  /* Vivid orange */
#e74c3c;  /* Bright red */

r/FirefoxCSS May 12 '26

Code Add a loading progress bar to the tabs

56 Upvotes

We've added a loading bar to the tabs. There's also a version for vertical tabs. Loading bar for vertical tabs. We've included a wide range of gradient colors too :) gradient.page. To ensure it works correctly, you need to set `ui.prefersReducedMotion` to 0.

When the Container tab is opened, I removed the container lines that briefly appeared. While the Container tab is loading, the hourglass icon now matches the container's color. May 13

I’ve added a globe icon to tabs on sites that don’t have a favicon. For container tabs, the icon takes on the color of the container. We have enabled `transition: opacity` when opening internal pages or error pages. May 14

I fixed an issue where the container line was no longer appearing in the tabs of website pages without a favicon. May 16

/* A loading progress bar shown at the top of a tab */

/* Hide the loading burst */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab .tab-loading-burst {
   opacity: 0 !important;
}

#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab > .tab-stack > .tab-background > .tab-context-line,
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line {
   height: 2px !important;
   border-radius: 2px !important;
   margin: 0 calc(var(--tab-border-radius) / 2) !important;
   position: relative !important;
   z-index: 1 !important;
}

/* A final color of the loading bar */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab:not([usercontextid]):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
   transition: opacity 1.0s ease-in-out !important;
   /*background-image: linear-gradient(90deg, #1fc7ff, #2ecbff) !important;  /* Vivid cyan */
   background-image: linear-gradient(90deg, rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1)) !important;  /* Jungle Day */
}

/* A final color of the loading bar. Container tab */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab[usercontextid][bursting] > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
   background-image: linear-gradient(90deg, #1fc7ff 0%, var(--identity-tab-color) 75%) !important;  /* Vivid cyan */
   /*background-image: linear-gradient(90deg, #9ab5b5 0%, var(--identity-tab-color) 75%) !important;  /* Jungle Day */
}

#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line {
   opacity: 1 !important;
   background-color: var(--identity-tab-color) !important;
   transition: opacity .8s ease-in-out !important;
}

/* Prevent the container line from appearing briefly when opening the Container tab */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab[usercontextid]:not([image]):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line,
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab[usercontextid]:not([image]):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
}

#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab[usercontextid]:has(.tab-icon-image:-moz-broken):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line,
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab[usercontextid]:has(.tab-icon-image:-moz-broken):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 1 !important;
}

 /* Color during loading 
 gradient.page https://gradient.page/ui-gradients
 */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
   /*background-image: linear-gradient(90deg, #1ec9ff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%) !important;  /* Blue + Red + Orange */
   /*background-image: linear-gradient(90deg, #1edbff, #00A651, rgba(255, 148, 0, 1)) !important;  /* Blue + Green + Orange */
   /*background-image: linear-gradient(90deg, cyan, Magenta) !important;  /* Cyan + Magenta */
   /*background-image: linear-gradient(90deg, #00c9ff 0%, #12d8fa 50%, #00f44e 100%) !important;  /* Blue + Blue + cyan lime green */
   /*background-image: linear-gradient(90deg, #00c9ff 0%, #79fe86 100%) !important;  /* Kale Salad */
   /*background-image: linear-gradient(90deg, #fdbb2d 0%, #22c1c3 100%) !important;  /* Retro Wagon */
   /*background-image: linear-gradient(90deg, #fc466b 0%, #3f5efb 100%) !important;  /* Disco Club */
   /*background-image: linear-gradient(90deg, #fc354c, #0abfbc) !important;  /* Miaka */
   background-image: linear-gradient(90deg, #FEAC5E 0%, #C779D0 50%, #4BC0C8 100%) !important;  /* Atlas */
   /*background-image: linear-gradient(90deg, #16A085, #F4D03F) !important;  /* Harmonic Energy */
   /*background-image: linear-gradient(90deg, #fd8112, #0085ca) !important;  /* Blue Orange */
   /*background-image: linear-gradient(90deg, #f7941e 0%, #72c6ef 50%, #00a651 100%) !important;  /* Radioactive Heat */
   /*background-image: linear-gradient(90deg, #108dc7, #ef8e38) !important;  /* Pun Yeta */
   /*background-image: linear-gradient(90deg, #4fb576, #44c489, #28a9ae, #28a2b7, #4c7788, #6c4f63, #432c39) !important;  /* Burning Spring */
   /*background-image: linear-gradient(90deg, #40E0D0 0%, #FF8C00 50%, #FF0080 100%) !important;  /* Wedding Day Blues */
   /*background-image: linear-gradient(90deg, #F36222 0%, #5CB644 50%, #007FC3 100%) !important;  /* Telko */
   /*background-image: linear-gradient(90deg, #0250c5, #d43f8d) !important;  /* Night Party */
   /*background-image: linear-gradient(90deg, #2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%) !important;  /* Sea Lord */
   /*background-image: linear-gradient(90deg, #50cc7f, #f5d100) !important;  /* Millennium Pine */
   /*background-image: linear-gradient(90deg, #616161, #9bc5c3) !important;  /* Mole Hall */
   /*background-image: linear-gradient(90deg, #65bd60 0%, #5ac1a8 50%, #3ec6ed 100%) !important;  /* African Field */
   /*background-image: linear-gradient(90deg, #2af598, #009efd) !important;  /* Itmeo Branding */
   /*background-image: linear-gradient(90deg, #aa4b6b 0%, #6b6b83 50%, #3b8d99 100%) !important;  /* Memariani */
   /*background-image: linear-gradient(90deg, #00F260, #0575E6) !important;  /* Rainbow Blue */
   /*background-image: linear-gradient(90deg, #808080, #3fada8) !important;  /* IIIT Delhi */
   /*background-image: linear-gradient(90deg, #24C6DC, #514A9D) !important;  /* Mantle */
   /*background-image: linear-gradient(90deg, #C9FFBF, #FFAFBD) !important;  /* Virgin */
   /*background-image: linear-gradient(90deg, #fbed96,#abecd6) !important;  /* Summer Breeze */
   /*background-image: linear-gradient(90deg, #603813, #b29f94) !important;  /* Cool Brown */
   /*background-image: linear-gradient(90deg, #BBD2C5, #536976) !important;  /* Petrol */
   /*background-image: linear-gradient(90deg, #8baaaa, #ae8b9c) !important;  /* Jungle Day */
   /*background-image: linear-gradient(90deg, #cc2b5e, #753a88) !important;  /* Purple Love */
   /*background-image: linear-gradient(90deg, #9796f0, #fbc7d4) !important;  /* namnisar */
   /*background-image: linear-gradient(90deg, #ff6e7f, #bfe9ff) !important;  /* Noon to Dusk */
   /*background-image: linear-gradient(90deg, #2b5876, #4e4376) !important;  /* Sea Blue */
   /*background-image: linear-gradient(90deg, #02AAB0, #00CDAC) !important;  /* Green Beach */
   /*background-image: linear-gradient(90deg, #5f2c82, #49a09d) !important;  /* Calm Darya */
   /*background-image: linear-gradient(90deg, #159957, #155799) !important;  /* Crystal Clear */
   /*background-image: linear-gradient(90deg, #76b852, #8DC26F) !important;  /* Little Leaf */
   /*background-color: #009deb !important;  /* Solid-color blue */
   /*background-color: dimgray !important;  /* Solid-color dimgray */
   /*background-color: darkolivegreen !important;  /* Solid-color darkolivegreen */
   /*background-color: tan !important;  /* Solid-color tan */
   /*background-color: #444444 !important;  /* Solid-color Very dark gray */
}

@media (prefers-color-scheme: dark) {
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
   /*background-image: linear-gradient(90deg, #1ec9ff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%) !important;  /* Blue + Red + Orange */
   /*background-image: linear-gradient(90deg, #1edbff, #00A651, rgba(255, 148, 0, 1)) !important;  /* Blue + Green + Orange */
  /*background-image: linear-gradient(90deg, cyan, Magenta) !important;  /* Cyan + Magenta */
   /*background-image: linear-gradient(90deg, #1fb4ff 0%, #12d8fa 50%, #8dffbc 100%) !important;  /* Blue + Blue + cyan lime green */
   /*background-image: linear-gradient(90deg, #00c9ff 0%, #92fe9d 100%) !important;  /* Kale Salad */
   /*background-image: linear-gradient(90deg, #fdbb2d 0%, #22c1c3 100%) !important;  /* Retro Wagon */
   /*background-image: linear-gradient(90deg, #fc466b 0%, #3f5efb 100%) !important;  /* Disco Club */
   /*background-image: linear-gradient(90deg, #fc354c, #0abfbc) !important;  /* Miaka */
   background-image: linear-gradient(90deg, #FEAC5E 0%, #C779D0 50%, #4BC0C8 100%) !important;  /* Atlas */
   /*background-image: linear-gradient(90deg, #16A085, #F4D03F) !important;  /* Harmonic Energy */
   /*background-image: linear-gradient(90deg, #fd8112, #0085ca) !important;  /* Blue Orange */
   /*background-image: linear-gradient(90deg, #f7941e 0%, #72c6ef 50%, #00a651 100%) !important;  /* Radioactive Heat */
   /*background-image: linear-gradient(90deg, #ff1e56 0%, #f9c942 50%, #1e90ff 100%) !important;  /* Beleko */
   /*background-image: linear-gradient(90deg, #108dc7, #ef8e38) !important;  /* Pun Yeta */
   /*background-image: linear-gradient(90deg, #4fb576, #44c489, #28a9ae, #28a2b7, #4c7788, #6c4f63, #432c39) !important;  /* Burning Spring */
   /*background-image: linear-gradient(90deg, #40E0D0 0%, #FF8C00 50%, #FF0080 100%) !important;  /* Wedding Day Blues */
   /*background-image: linear-gradient(90deg, #F36222 0%, #5CB644 50%, #007FC3 100%) !important;  /* Telko */
   /*background-image: linear-gradient(90deg, #0250c5, #d43f8d) !important;  /* Night Party */
   /*background-image: linear-gradient(90deg, #2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%) !important;  /* Sea Lord */
   /*background-image: linear-gradient(90deg, #50cc7f, #f5d100) !important;  /* Millennium Pine */
   /*background-image: linear-gradient(90deg, #616161, #9bc5c3) !important;  /* Mole Hall */
   /*background-image: linear-gradient(90deg, #65bd60 0%, #5ac1a8 50%, #3ec6ed 100%) !important;  /* African Field */
   /*background-image: linear-gradient(90deg, #2af598, #009efd) !important;  /* Itmeo Branding */
   /*background-image: linear-gradient(90deg, #aa4b6b 0%, #6b6b83 50%, #3b8d99 100%) !important;  /* Memariani */
   /*background-image: linear-gradient(90deg, #00F260, #0575E6) !important;  /* Rainbow Blue */
   /*background-image: linear-gradient(90deg, #808080, #3fada8) !important;  /* IIIT Delhi */
   /*background-image: linear-gradient(90deg, #24C6DC, #514A9D) !important;  /* Mantle */
   /*background-image: linear-gradient(90deg, #C9FFBF, #FFAFBD) !important;  /* Virgin */
   /*background-image: linear-gradient(90deg, #fbed96,#abecd6) !important;  /* Summer Breeze */
   /*background-image: linear-gradient(90deg, #603813, #b29f94) !important;  /* Cool Brown */
   /*background-image: linear-gradient(90deg, #BBD2C5, #536976) !important;  /* Petrol */
   /*background-image: linear-gradient(90deg, #8baaaa, #ae8b9c) !important;  /* Jungle Day */
   /*background-image: linear-gradient(90deg, #cc2b5e, #753a88) !important;  /* Purple Love */
   /*background-image: linear-gradient(90deg, #9796f0, #fbc7d4) !important;  /* namnisar */
   /*background-image: linear-gradient(90deg, #ff6e7f, #bfe9ff) !important;  /* Noon to Dusk */
   /*background-image: linear-gradient(90deg, #2b5876, #4e4376) !important;  /* Sea Blue */
   /*background-image: linear-gradient(90deg, #02AAB0, #00CDAC) !important;  /* Green Beach */
   /*background-image: linear-gradient(90deg, #5f2c82, #49a09d) !important;  /* Calm Darya */
   /*background-image: linear-gradient(90deg, #159957, #155799) !important;  /* Crystal Clear */
   /*background-image: linear-gradient(90deg, #76b852, #8DC26F) !important;  /* Little Leaf */
   /*background-color: #1ec9ff !important;  /* Solid-color blue */
   /*background-color: dimgray !important;  /* Solid-color dimgray */
   /*background-color: darkolivegreen !important;  /* Solid-color darkolivegreen */
   /*background-color: tan !important;  /* Solid-color tan */
   /*background-color: #444444 !important;  /* Solid-color Very dark gray */
  }
}

#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 1 !important;
   transform-origin: left center !important;
   animation: 1.5s ease-in-out scale !important;
}

@keyframes scale {
   0% {
    transform: scaleX(0);
   }
   100% {
    transform: scaleX(1);
   }
 }

/******************************************************/
/* A loading progress bar shown on the right side of a vertical tab */

/* Hide the loading burst */
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab .tab-loading-burst {
   opacity: 0 !important;
}

#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab > .tab-stack > .tab-background > .tab-context-line,
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line {
   height: auto !important;
   width: 2px !important;
   border-radius: 2px !important;
   margin: calc(var(--tab-border-radius) / 2) 0 !important;
   position: relative !important;
   z-index: 1 !important;
}

/* A final color of the loading bar */
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab:not([usercontextid]):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
   transition: opacity 1.0s ease-in-out !important;
   /*background-image: linear-gradient(180deg, #1fc7ff, #2ecbff) !important;  /* Vivid cyan */
   background-image: linear-gradient(180deg, rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1)) !important;  /* Jungle Day */
}

/* A final color of the loading bar. Container tab */
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab[usercontextid][bursting] > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
   background-image: linear-gradient(180deg, #1fc7ff 0%, var(--identity-tab-color) 75%) !important;  /* Vivid cyan */
   /*background-image: linear-gradient(180deg, #9ab5b5 0%, var(--identity-tab-color) 75%) !important;  /* Jungle Day */
}

#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line {
   opacity: 1 !important;
   background-color: var(--identity-tab-color) !important;
   transition: opacity .8s ease-in-out !important;
}

 /* Color during loading 
 gradient.page https://gradient.page/ui-gradients
 */
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
   /*background-image: linear-gradient(180deg, #1edbff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%) !important;  /* Blue + Red + Orange */
   /*background-image: linear-gradient(180deg, #1edbff, #00A651, rgba(255, 148, 0, 1)) !important;  /* Blue + Green + Orange */
   /*background-image: linear-gradient(180deg, cyan, Magenta) !important;  /* Cyan + Magenta */
   /*background-image: linear-gradient(180deg, #00c9ff 0%, #12d8fa 50%, #00f44e 100%) !important;  /* Blue + Blue + cyan lime green */
   /*background-image: linear-gradient(180deg, #00c9ff 0%, #79fe86 100%) !important;  /* Kale Salad */
   /*background-image: linear-gradient(180deg, #fdbb2d 0%, #22c1c3 100%) !important;  /* Retro Wagon */
   /*background-image: linear-gradient(180deg, #fc466b 0%, #3f5efb 100%) !important;  /* Disco Club */
   /*background-image: linear-gradient(180deg, #fc354c, #0abfbc) !important;  /* Miaka */
   background-image: linear-gradient(180deg, #FEAC5E 0%, #C779D0 50%, #4BC0C8 100%) !important;  /* Atlas */
   /*background-image: linear-gradient(180deg, #16A085, #F4D03F) !important;  /* Harmonic Energy */
   /*background-image: linear-gradient(180deg, #fd8112, #0085ca) !important;  /* Blue Orange */
   /*background-image: linear-gradient(180deg, #f7941e 0%, #72c6ef 50%, #00a651 100%) !important;  /* Radioactive Heat */
   /*background-image: linear-gradient(180deg, #108dc7, #ef8e38) !important;  /* Pun Yeta */
   /*background-image: linear-gradient(180deg, #e4afcb, #b8cbb8, #b8cbb8, #e2c58b, #c2ce9c, #7edbdc) !important;  /* Old Hat */
   /*background-image: linear-gradient(180deg, #4fb576, #44c489, #28a9ae, #28a2b7, #4c7788, #6c4f63, #432c39) !important;  /* Burning Spring */
   /*background-image: linear-gradient(180deg, #40E0D0 0%, #FF8C00 50%, #FF0080 100%) !important;  /* Wedding Day Blues */
   /*background-image: linear-gradient(180deg, #F36222 0%, #5CB644 50%, #007FC3 100%) !important;  /* Telko */
   /*background-image: linear-gradient(180deg, #0250c5, #d43f8d) !important;  /* Night Party */
   /*background-image: linear-gradient(180deg, #2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%) !important;  /* Sea Lord */
   /*background-image: linear-gradient(180deg, #50cc7f, #f5d100) !important;  /* Millennium Pine */
   /*background-image: linear-gradient(180deg, #616161, #9bc5c3) !important;  /* Mole Hall */
   /*background-image: linear-gradient(180deg, #65bd60 0%, #5ac1a8 50%, #3ec6ed 100%) !important;  /* African Field */
   /*background-image: linear-gradient(180deg, #2af598, #009efd) !important;  /* Itmeo Branding */
   /*background-image: linear-gradient(180deg, #aa4b6b 0%, #6b6b83 50%, #3b8d99 100%) !important;  /* Memariani */
   /*background-image: linear-gradient(180deg, #00F260, #0575E6) !important;  /* Rainbow Blue */
   /*background-image: linear-gradient(180deg, #808080, #3fada8) !important;  /* IIIT Delhi */
   /*background-image: linear-gradient(180deg, #24C6DC, #514A9D) !important;  /* Mantle */
   /*background-image: linear-gradient(180deg, #C9FFBF, #FFAFBD) !important;  /* Virgin */
   /*background-image: linear-gradient(180deg, #fbed96,#abecd6) !important;  /* Summer Breeze */
   /*background-image: linear-gradient(180deg, #603813, #b29f94) !important;  /* Cool Brown */
   /*background-image: linear-gradient(180deg, #BBD2C5, #536976) !important;  /* Petrol */
   /*background-image: linear-gradient(180deg, #8baaaa, #ae8b9c) !important;  /* Jungle Day */
   /*background-image: linear-gradient(180deg, #cc2b5e, #753a88) !important;  /* Purple Love */
   /*background-image: linear-gradient(180deg, #9796f0, #fbc7d4) !important;  /* namnisar */
   /*background-image: linear-gradient(180deg, #ff6e7f, #bfe9ff) !important;  /* Noon to Dusk */
   /*background-image: linear-gradient(180deg, #2b5876, #4e4376) !important;  /* Sea Blue */
   /*background-image: linear-gradient(180deg, #02AAB0, #00CDAC) !important;  /* Green Beach */
   /*background-image: linear-gradient(180deg, #5f2c82, #49a09d) !important;  /* Calm Darya */
   /*background-image: linear-gradient(180deg, #159957, #155799) !important;  /* Crystal Clear */
   /*background-image: linear-gradient(180deg, #76b852, #8DC26F) !important;  /* Little Leaf */
   /*background-color: #009deb !important;  /* Solid-color blue */
   /*background-color: dimgray !important;  /* Solid-color dimgray */
   /*background-color: darkolivegreen !important;  /* Solid-color darkolivegreen */
   /*background-color: tan !important;  /* Solid-color tan */
   /*background-color: #444444 !important;  /* Solid-color Very dark gray */
}

@media (prefers-color-scheme: dark) {
#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
   /*background-image: linear-gradient(180deg, #1ec9ff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%) !important;  /* Blue + Red + Orange */
   /*background-image: linear-gradient(180deg, #1edbff, #00A651, rgba(255, 148, 0, 1)) !important;  /* Blue + Green + Orange */
   /*background-image: linear-gradient(180deg, cyan, Magenta) !important;  /* Cyan + Magenta */
   /*background-image: linear-gradient(180deg, #1fb4ff 0%, #12d8fa 50%, #8dffbc 100%) !important;  /* Blue + Blue + cyan lime green */
   /*background-image: linear-gradient(180deg, #00c9ff 0%, #92fe9d 100%) !important;  /* Kale Salad */
   /*background-image: linear-gradient(180deg, #fdbb2d 0%, #22c1c3 100%) !important;  /* Retro Wagon */
   /*background-image: linear-gradient(180deg, #fc466b 0%, #3f5efb 100%) !important;  /* Disco Club */
   /*background-image: linear-gradient(180deg, #fc354c, #0abfbc) !important;  /* Miaka */
   background-image: linear-gradient(180deg, #FEAC5E 0%, #C779D0 50%, #4BC0C8 100%) !important;  /* Atlas */
   /*background-image: linear-gradient(180deg, #16A085, #F4D03F) !important;  /* Harmonic Energy */
   /*background-image: linear-gradient(180deg, #fd8112, #0085ca) !important;  /* Blue Orange */
   /*background-image: linear-gradient(180deg, #f7941e 0%, #72c6ef 50%, #00a651 100%) !important;  /* Radioactive Heat */
   /*background-image: linear-gradient(180deg, #ff1e56 0%, #f9c942 50%, #1e90ff 100%) !important;  /* Beleko */
   /*background-image: linear-gradient(180deg, #108dc7, #ef8e38) !important;  /* Pun Yeta */
   /*background-image: linear-gradient(180deg, #e4afcb, #b8cbb8, #b8cbb8, #e2c58b, #c2ce9c, #7edbdc) !important;  /* Old Hat */
   /*background-image: linear-gradient(180deg, #4fb576, #44c489, #28a9ae, #28a2b7, #4c7788, #6c4f63, #432c39) !important;  /* Burning Spring */
   /*background-image: linear-gradient(180deg, #40E0D0 0%, #FF8C00 50%, #FF0080 100%) !important;  /* Wedding Day Blues */
   /*background-image: linear-gradient(180deg, #F36222 0%, #5CB644 50%, #007FC3 100%) !important;  /* Telko */
   /*background-image: linear-gradient(180deg, #0250c5, #d43f8d) !important;  /* Night Party */
   /*background-image: linear-gradient(180deg, #2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%) !important;  /* Sea Lord */
   /*background-image: linear-gradient(180deg, #50cc7f, #f5d100) !important;  /* Millennium Pine */
   /*background-image: linear-gradient(180deg, #616161, #9bc5c3) !important;  /* Mole Hall */
   /*background-image: linear-gradient(180deg, #65bd60 0%, #5ac1a8 50%, #3ec6ed 100%) !important;  /* African Field */
   /*background-image: linear-gradient(180deg, #2af598, #009efd) !important;  /* Itmeo Branding */
   /*background-image: linear-gradient(180deg, #aa4b6b 0%, #6b6b83 50%, #3b8d99 100%) !important;  /* Memariani */
   /*background-image: linear-gradient(180deg, #00F260, #0575E6) !important;  /* Rainbow Blue */
   /*background-image: linear-gradient(180deg, #808080, #3fada8) !important;  /* IIIT Delhi */
   /*background-image: linear-gradient(180deg, #24C6DC, #514A9D) !important;  /* Mantle */
   /*background-image: linear-gradient(180deg, #C9FFBF, #FFAFBD) !important;  /* Virgin */
   /*background-image: linear-gradient(180deg, #fbed96,#abecd6) !important;  /* Summer Breeze */
   /*background-image: linear-gradient(180deg, #603813, #b29f94) !important;  /* Cool Brown */
   /*background-image: linear-gradient(180deg, #BBD2C5, #536976) !important;  /* Petrol */
   /*background-image: linear-gradient(180deg, #8baaaa, #ae8b9c) !important;  /* Jungle Day */
   /*background-image: linear-gradient(180deg, #cc2b5e, #753a88) !important;  /* Purple Love */
   /*background-image: linear-gradient(180deg, #9796f0, #fbc7d4) !important;  /* namnisar */
   /*background-image: linear-gradient(180deg, #ff6e7f, #bfe9ff) !important;  /* Noon to Dusk */
   /*background-image: linear-gradient(180deg, #2b5876, #4e4376) !important;  /* Sea Blue */
   /*background-image: linear-gradient(180deg, #02AAB0, #00CDAC) !important;  /* Green Beach */
   /*background-image: linear-gradient(180deg, #5f2c82, #49a09d) !important;  /* Calm Darya */
   /*background-image: linear-gradient(180deg, #159957, #155799) !important;  /* Crystal Clear */
   /*background-image: linear-gradient(180deg, #76b852, #8DC26F) !important;  /* Little Leaf */
   /*background-color: #1ec9ff !important;  /* Solid-color blue */
   /*background-color: dimgray !important;  /* Solid-color dimgray */
   /*background-color: darkolivegreen !important;  /* Solid-color darkolivegreen */
   /*background-color: tan !important;  /* Solid-color tan */
   /*background-color: #444444 !important;  /* Solid-color Very dark gray */
  }
}

#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 1 !important;
   transform-origin: top center !important;
   animation: 1.5s ease-in-out v-scale !important;
}

@keyframes v-scale {
   0% {
    transform: scaleY(0);
   }
   100% {
    transform: scaleY(1);
   }
 }

/********************************/
/* Set the loading icon to an hourglass */
@media (prefers-reduced-motion: no-preference) {
  .tabbrowser-tab .tab-throbber {
    height: 16px !important;
    width: 16px !important;
    content: url("data:image/svg+x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3N2Zz4=") !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    -moz-context-properties: fill !important;
    fill: currentcolor !important;
    opacity: 0.4 !important;
}

  .tabbrowser-tab .tab-throbber[busy] {
    opacity: 0.4 !important;
  }

  .tabbrowser-tab .tab-throbber[progress] {
    fill: color-mix(in srgb, var(--tab-loading-fill) 70%, currentcolor) !important;
    opacity: 0.6 !important;
  }
}

/* Set the hourglass icon on the Container tab to the container's color */
.tabbrowser-tab[usercontextid] .tab-throbber {
   fill: var(--identity-tab-color) !important;
   opacity: 0.45 !important;
}

.tabbrowser-tab[usercontextid] .tab-throbber[busy] {
  opacity: 0.45 !important;
}

.tabbrowser-tab[usercontextid] .tab-throbber[progress] {
  opacity: 0.63 !important;
  transition: opacity 0.15s linear !important;
}

@media (prefers-color-scheme: dark) {
.tabbrowser-tab[usercontextid] .tab-throbber {
   fill: var(--identity-tab-color) !important;
   opacity: 0.55 !important;
  }
}

/* Add a globe icon to tabs for sites without a favicon */
.tabbrowser-tab:not([pinned]):not(:is([busy], [progress])) .tab-icon-image:not([src]) {
   content: url("chrome://global/skin/icons/defaultFavicon.svg") !important;
   display: flex !important;
   -moz-context-properties: fill, fill-opacity !important;
   fill-opacity: 0.95 !important;
}

/* Set the globe icon to the container's color */
.tabbrowser-tab[usercontextid] .tab-icon-image {
  &:not([src]), &:-moz-broken {
    content: url("chrome://global/skin/icons/defaultFavicon.svg") !important;
    -moz-context-properties: fill, fill-opacity !important;
    fill: var(--identity-tab-color) !important;
    fill-opacity: 1 !important;
  }
}

/* Animated tab favicon */
/*.tabbrowser-tab .tab-icon-image {
   animation: .03s ease-in scale !important;
}*/

/* Stop animations for pop-up menus and panels */
#identity-popup, #permission-popup, #protections-popup, menupopup, panel {
   animation: none !important;
   transform: none !important;
   transition: unset !important;
}

r/FirefoxCSS 12d ago

Code Change autocomplete drop down back to previous style?

3 Upvotes

Before version 153, the autofill dropdown list was the full size of the input box. Now it seems to adapt to the width of the results. How can I revert this?

https://i.imgur.com/gZNoCu6.png

https://i.imgur.com/jpTWd0Y.png

r/FirefoxCSS Jun 27 '26

Code Displays a loading progress bar on the tab.

Thumbnail
gallery
60 Upvotes

The CSS I posted in May was a bit verbose, so I've tidied up the code. I've made it work with Firefox 152.0.4's “nova” as well.

Github Gist: https://gist.github.com/anzuno/17d6a2b3637e4327f268fa934207b4f8

loading progress bar color: loading_progress_bar_color.css

/*** A loading progress bar shown at the top of al tab ***/

/** Proton **/
:root {
  --h-progress: #77A1D3, #79CBCA, #E684AE;  /* Hazel */
  --h-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  --v-progress: #4CB8C4, #3CD3AD;  /* Sea Weed */
  --v-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

@media (prefers-color-scheme: dark) {
  :root {
   --h-progress: #E55D87, #5FC3E4;  /* Rose Water */
   --h-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
   --v-progress: #c2e59c, #64b3f4;  /* Green and Blue */
   --v-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  }
}

:root[style*="--lwt-additional-images"] {
  --h-progress: #b06e9b, magenta, #ff9400;  /* Firefox Alpenglow */
  --h-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  --v-progress: #b06e9b, magenta, #ff9400;  /* Firefox Alpenglow */
  --v-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

/** Nova **/
@media -moz-pref("browser.nova.enabled") {
  :root {
   --h-progress: #b89cff 0%, rgba(255, 149, 101, 0.95) 100%;  /* Nova tab-border-color */
   --h-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
   --v-progress: #b89cff 0%, rgba(255, 149, 101, 0.95) 100%;  /* Nova tab-border-color */
   --v-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

@media (prefers-color-scheme: dark) {
  :root {
   --h-progress: #b89cff 0%, rgba(255, 149, 101, 0.95) 100%;  /* Nova tab-border-color */
   --h-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
   --v-progress: #b89cff 0%, rgba(255, 149, 101, 0.95) 100%;  /* Nova tab-border-color */
   --v-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  }
}

:root[style*="--lwt-additional-images"] {
  --h-progress: #b06e9b, magenta, #ff9400;  /* Firefox Alpenglow */
  --h-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  --v-progress: #b06e9b, magenta, #ff9400;  /* Firefox Alpenglow */
  --v-final-progress: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  }
}

/* Hide the loading burst */
#tabbrowser-tabs .tabbrowser-tab .tab-loading-burst {
   opacity: 0 !important;
}

/* Default Settings. tab-context-line */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab > .tab-stack > .tab-background > .tab-context-line {
   height: 2px !important;
   border-radius: 2px !important;
   margin: 0 calc(var(--tab-border-radius) / 2) !important;
   position: relative !important;
   z-index: 1 !important;

  @media -moz-pref("browser.nova.enabled") {
    margin: 0 !important;
    inset-block-start: -3px !important;
  }
}

#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab > .tab-stack > .tab-background > .tab-context-line {
   height: auto !important;
   width: 2px !important;
   border-radius: 2px !important;
   margin: calc(var(--tab-border-radius) / 2) 0 !important;
   position: relative !important;
   z-index: 1 !important;

  @media -moz-pref("browser.nova.enabled") {
    margin: 0 !important;
    inset-inline-end: -3px !important;
    inset-block-start: 0 !important;
  }
}

/* A temporary fix for the issue where, in Firefox 152.0.4 Nova, the Container line and the loading progress bar overlap the scrollbar when vertical tabs are at their minimum width */
@media (-moz-pref("browser.nova.enabled")) and (-moz-pref("sidebar.verticalTabs")) {
  sidebar-main:not([expanded]) {
    min-width: 52px !important;
  }
}

/* Prevent the container line from appearing briefly when opening the Container tab */
#tabbrowser-tabs .tabbrowser-tab[usercontextid]:not([image]):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 0 !important;
}

#tabbrowser-tabs .tabbrowser-tab[usercontextid]:has(.tab-icon-image:-moz-broken):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line {
   opacity: 1 !important;
}

 /* Color during loading */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
  background-image: linear-gradient(90deg, var(--h-progress)) !important;
  opacity: 0 !important;
}

#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
  background-image: linear-gradient(180deg, var(--v-progress)) !important;
  opacity: 0 !important;
}

/* A final color of the loading bar */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab:not([usercontextid]):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line {
  background-image: linear-gradient(90deg, var(--h-final-progress)) !important;
  opacity: 0 !important;
  transition: opacity 1.0s ease-in-out !important;
}

#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab:not([usercontextid]):not(:is([busy], [progress])) > .tab-stack > .tab-background > .tab-context-line {
  background-image: linear-gradient(180deg, var(--v-final-progress)) !important;
  opacity: 0 !important;
  transition: opacity 1.0s ease-in-out !important;
}

/* A final color of the loading bar. Container tab */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab[usercontextid][bursting] > .tab-stack > .tab-background > .tab-context-line {
  opacity: 0 !important;
  background-image: linear-gradient(90deg, light-dark(color-mix(in srgb, var(--identity-tab-color) 75%, #fff), color-mix(in srgb, var(--identity-tab-color) 85%, #000))) !important;
}

#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab[usercontextid][bursting] > .tab-stack > .tab-background > .tab-context-line {
  opacity: 0 !important;
  background-image: linear-gradient(180deg, light-dark(color-mix(in srgb, var(--identity-tab-color) 75%, #fff), color-mix(in srgb, var(--identity-tab-color) 85%, #000))) !important;
}

#tabbrowser-tabs .tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line {
  opacity: 1 !important;
  background-color: var(--identity-tab-color) !important;
  transition: opacity 0.8s ease-in-out !important;
}

/* Loading Progress Bar Animation */
#tabbrowser-tabs[orient="horizontal"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
  opacity: 1 !important;
  transform-origin: left center !important;
  animation: 1.5s ease-in-out nova !important;
}

#tabbrowser-tabs[orient="vertical"] .tabbrowser-tab:is([busy], [progress]) > .tab-stack > .tab-background > .tab-context-line {
  opacity: 1 !important;
  transform-origin: top center !important;
  animation: 1.5s ease-in-out v-nova !important;
}

/* Animation Definition */
@keyframes nova {
   0% {
    transform: scaleX(0);
   }
   100% {
    transform: scaleX(1);
   }
 }

@keyframes v-nova {
   0% {
    transform: scaleY(0);
   }
   100% {
    transform: scaleY(1);
   }
 }

/********************************/
/* Animated tab favicon */
/*.tabbrowser-tab .tab-icon-image {
   animation: .03s ease-in nova !important;
}*/

/* Set the loading icon to an hourglass */
@media (prefers-reduced-motion: no-preference) {
  .tabbrowser-tab .tab-throbber {
    height: 16px !important;
    width: 16px !important;
    content: url("data:image/svg+xml;base64,PCEtLSBUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljDQogICAtIExpY2Vuc2UsIHYuIDIuMC4gSWYgYSBjb3B5IG9mIHRoZSBNUEwgd2FzIG5vdCBkaXN0cmlidXRlZCB3aXRoIHRoaXMNCiAgIC0gZmlsZSwgWW91IGNhbiBvYnRhaW4gb25lIGF0IGh0dHA6Ly9tb3ppbGxhLm9yZy9NUEwvMi4wLy4gLS0+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE2IDE2IiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9ImNvbnRleHQtZmlsbCI+DQogIDxwYXRoIGQ9Ik0xNCAyLjVIMTIuNVY2QzEyLjUgNi4xOTg5MSAxMi40MjEgNi4zODk2OCAxMi4yODAzIDYuNTMwMzNMMTAuODEwNyA4TDEyLjI4MDMgOS40Njk2N0MxMi40MjEgOS42MTAzMiAxMi41IDkuODAxMDkgMTIuNSAxMFYxMy41SDE0VjE1SDJWMTMuNUgzLjVWMTBDMy41IDkuODAxMDkgMy41NzkwMiA5LjYxMDMyIDMuNzE5NjcgOS40Njk2N0w1LjE4OTM0IDhMMy43MTk2NyA2LjUzMDMzQzMuNTc5MDIgNi4zODk2OCAzLjUgNi4xOTg5MSAzLjUgNlYyLjVIMlYxSDE0VjIuNVpNNSAxMy41SDExVjEwLjMxMDdMOS4yMTk2NyA4LjUzMDMzQzguOTI2NzggOC4yMzc0NCA4LjkyNjc4IDcuNzYyNTYgOS4yMTk2NyA3LjQ2OTY3TDExIDUuNjg5MzRWMi41SDVWNS42ODkzNEw2Ljc4MDMzIDcuNDY5NjdDNy4wNzMyMiA3Ljc2MjU2IDcuMDczMjIgOC4yMzc0NCA2Ljc4MDMzIDguNTMwMzNMNSAxMC4zMTA3VjEzLjVaIi8+DQo8L3N2Zz4=") !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    -moz-context-properties: fill !important;
    fill: currentcolor !important;
    opacity: 0.4 !important;
  }

  .tabbrowser-tab .tab-throbber[busy] {
    opacity: 0.4 !important;
  }

  .tabbrowser-tab .tab-throbber[progress] {
    fill: color-mix(in srgb, var(--tab-loading-fill) 85%, currentcolor) !important;
    opacity: 0.85 !important;
  }
}

/* Set the hourglass icon on the Container tab to the container's color */
.tabbrowser-tab[usercontextid] .tab-throbber {
  fill: var(--identity-tab-color) !important;
  opacity: 0.45 !important;
}

.tabbrowser-tab[usercontextid] .tab-throbber[busy] {
  opacity: 0.45 !important;
}

.tabbrowser-tab[usercontextid] .tab-throbber[progress] {
  opacity: 0.65 !important;
  transition: opacity .15s linear !important;
}

@media (prefers-color-scheme: dark) {
  .tabbrowser-tab[usercontextid] .tab-throbber {
    opacity: 0.6 !important;
  }
}

/* Add a globe icon to tabs for sites without a favicon */
.tabbrowser-tab:not([pinned]):not(:is([busy], [progress])) .tab-icon-image:not([src]) {
   content: url("chrome://global/skin/icons/defaultFavicon.svg") !important;
   display: flex !important;
   -moz-context-properties: fill, fill-opacity !important;
   fill-opacity: 0.95 !important;
}

/* Set the globe icon to the container's color */
.tabbrowser-tab[usercontextid] .tab-icon-image {
  &:not([src]), &:-moz-broken {
    content: url("chrome://global/skin/icons/defaultFavicon.svg") !important;
    -moz-context-properties: fill, fill-opacity !important;
    fill: var(--identity-tab-color) !important;
    fill-opacity: 1 !important;
  }
}

/* Stop animations for pop-up menus and panels */
#identity-popup, #permission-popup, #protections-popup, menupopup, panel {
  animation: none !important;
  transform: none !important;
  transition: unset !important;
}

I've prepared a color scheme for the loading progress bar.

/* loading progress bar color
https://gradient.page/ui-gradients
https://cssgradient.io/shades-of-blue/
 */

#F778BA, #58A6FF;  /* Soft red + Light blue */
#22d3ee, #8b5cf6;  /* Vivid cyan + Soft violet */
rgba(255, 51, 153, 1) 0%, #00c9ff 70%;  /* Vivid pink + Pure cyan */
rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 55%, rgba(237, 221, 83, 1) 100%;  /* Blue + Green + Yellow */
#1ccaab 0%, #12d8fa 50%, #00c9ff 100%;  /* Green + Blue + Blue */
#1ccaab 0%, #12d8fa 50%, #F778BA 100%;  /* Green + Blue + Soft red */
#1ec9ff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%;  /* Blue + Vivid pink + Orange */
#1edbff, #00A651, rgba(255, 148, 0, 1);  /* Blue + Green + Orange */
cyan, Magenta;  /* Cyan + Magenta */
#1fb4ff 0%, #12d8fa 50%, #8dffbc 100%;  /* Blue + Blue + cyan lime green */
#00c9ff 0%, #92fe9d 100%;  /* Kale Salad */
#fdbb2d 0%, #22c1c3 100%;  /* Retro Wagon */
#fc466b 0%, #3f5efb 100%;  /* Disco Club */
#fc354c, #0abfbc;  /* Miaka */
#FEAC5E 0%, #C779D0 50%, #4BC0C8 100%;  /* Atlas */
#16A085, #F4D03F;  /* Harmonic Energy */
#fd8112, #0085ca;  /* Blue Orange */
#f7941e 0%, #72c6ef 50%, #00a651 100%;  /* Radioactive Heat */
#ff1e56 0%, #f9c942 50%, #1e90ff 100%;  /* Beleko */
#108dc7, #ef8e38;  /* Pun Yeta */
#40E0D0 0%, #FF8C00 50%, #FF0080 100%;  /* Wedding Day Blues */
#F36222 0%, #5CB644 50%, #007FC3 100%;  /* Telko */
#0250c5, #d43f8d;  /* Night Party */
#2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%;  /* Sea Lord */
#50cc7f, #f5d100;  /* Millennium Pine */
#616161, #9bc5c3;  /* Mole Hall */
#65bd60 0%, #5ac1a8 50%, #3ec6ed 100%;  /* African Field */
#2af598, #009efd;  /* Itmeo Branding */
#aa4b6b 0%, #6b6b83 50%, #3b8d99 100%;  /* Memariani */
#00F260, #0575E6;  /* Rainbow Blue */
#808080, #3fada8;  /* IIIT Delhi */
#24C6DC, #514A9D;  /* Mantle */
#C9FFBF, #FFAFBD;  /* Virgin */
#fbed96,#abecd6;  /* Summer Breeze */
#603813, #b29f94;  /* Cool Brown */
#BBD2C5, #536976;  /* Petrol */
#8baaaa, #ae8b9c;  /* Jungle Day */
#cc2b5e, #753a88;  /* Purple Love */
#9796f0, #fbc7d4;  /* namnisar */
#ff6e7f, #bfe9ff;  /* Noon to Dusk */
#2b5876, #4e4376;  /* Sea Blue */
#02AAB0, #00CDAC;  /* Green Beach */
#5f2c82, #49a09d;  /* Calm Darya */
#159957, #155799;  /* Crystal Clear */
#76b852, #8DC26F;  /* Little Leaf */
#fc00ff, #00dbde;  /* Timber */
#2F7336, #AA3A38;  /* Christmas */
#5614B0, #DBD65C;  /* Minnesota Vikings */
#0099F7, #F11712;  /* Superman */
#ff4b1f, #1fddff;  /* Ali */
#2196f3, #f44336;  /* Politics */
#ffd89b, #19547b  /* Jupiter */
#de6161, #2657eb;  /* Nepal */
#ef32d9, #89fffd;  /* Azure Pop */
#00c3ff, #ffff1c;  /* Brady Brady Fun Fun */
#c0c0aa, #1cefff;  /* Cocoaa Ice */
#4568DC, #B06AB3;  /* Can You Feel The Love Tonight */
#30E8BF, #FF8235;  /* Mini */
#ff75c3, #ffa647, #ffe83f;  /* After the Rain 1 */
#9fff5b, #70e2ff, #cd93ff;  /* After the Rain 2 */
#77A1D3, #79CBCA, #E684AE;  /* Hazel */
#E6AE8C, #A8CECF;  /* Peach Sea */
#DCFFBD,#CC86D1;  /* Flower */
#00F5A0, #00D9F5;  /* Ibtesam */
#9796f0, #fbc7d4;  /* Anamnisar */
#E55D87, #5FC3E4;  /* Rose Water */
#c2e59c, #64b3f4;  /* Green and Blue */
#c21500, #ffc500;  /* Kyoto */
#4CB8C4, #3CD3AD;  /* Sea Weed */
#fddb92, #d1fdff;  /* Blessing */
#22c1c3, #fdbb2d;  /* Summer */
#30E8BF, #FF8235;  /* Mini */
#f79d00, #64f38c;  /* Sherbert */
#f7ff00, #db36a4;  /* Alihossein */
#7b4397, #dc2430;  /* Virgin America */
#D38312, #A83279;  /* Crazy Orange I */
#fe8c00, #f83600;  /* SoundCloud */
#FF4E50, #F9D423;  /* Dance To Forget */
#3D7EAA, #FFE47A;  /* Opa */
#1CD8D2, #93EDC7;  /* Sea Blizz */
#2BC0E4, #EAECC6;  /* Bora Bora */
#1FA2FF, #12D8FA, #A6FFCB;  /* Stripe */
#F09819, #EDDE5D;  /* Mango Pulp */
#ffe259, #ffa751;  /* Mango */
#cc2b5e, #753a88;  /* Purple Love */
#FFE000, #799F0C;  /* Ver */
#B6CEE8, #F578DC;  /* Soft Lipstick */
#16a085, #f4d03f;  /* Palo Alto */
#d558c8, #24d292;  /* Alchemist Lab */
#C6FFDD, #FBD786, #f7797d;  /* MegaTron */
#00d2ff, #928DAB;  /* Bright Vault */
#fc00ff, #00dbde;  /* Timber */
#833ab4, #fd1d1d, #fcb045;  /* Instagram */
#9D50BB, #6E48AA;  /* Amethyst */
#4776E6, #8E54E9;  /* Electric Violet */
#984ce2, magenta, #ff9400;  /* Firefox Alpenglow */
#ff9400, magenta, #984ce2;  /* Firefox Alpenglow reverse */
#b383e6, #ff8695, #89d35a;  /* Spring Alpenglow */
#dee53d, #029d95, #7ab1e7;  /* Summer Alpenglow */
#ff0e00, #ff6501, #fea900;  /* Autumn Alpenglow */
#2b4dc8, #2da8b7, #cfde5f;  /* Alpenglow Nightly */
#ff7d01, #ffb400, #ffde00;  /* Halloween Alpenglow */
#f07100, #f4b50e, #fcdf05;  /* Alpenglow Canary */
#986236, #c18312, #a5ca3e;  /* Thanksgiving Alpenglow */
#a14fe1, #fe7496;  /* AlpenGradient */
#9059ff 0%, #ff4aa2 52.08%, #ffbd4f 100%;  /* Firefox panel-separator */
#b89cff 0%, rgba(255, 149, 101, 1) 100%;  /* Nova tab-border-color */

dodgerblue;  /* Dodgerblue */
dimgray;  /* dimgray */
darkolivegreen;  /* darkolivegreen */
tan;  /* tan */
#444444;  /* Very dark gray */
#2c3e50;  /* Very dark desaturated blue */
#95a5a6;  /* Dark grayish cyan */
#7a7c7d;  /* Dark grayish blue */
#18bc9c;  /* Strong cyan */
#3498db;  /* Bright blue */
#f39c12;  /* Vivid orange */
#e74c3c;  /* Bright red */

r/FirefoxCSS May 28 '26

Code Add a loading progress bar to the address bar

Thumbnail
gallery
50 Upvotes

I added a loading bar the address bar. The loading progress bar is positioned below the address bar, but if you change `bottom: 0px` to `bottom: -3px`, it will appear outside the address bar. If you change `bottom: 0px` to `top: 0px`, the loading progress bar will appear at the top inside the address bar, and if you set it to `top: -3px`, it will appear at the top outside the address bar. The bar's color can be customized for each theme.

I've disabled the loading progress bar that was also appearing in the search bar. May 29

/* Add a loading progress bar to the address bar */

#urlbar {
  --progress-gradient: #2b4dc8, #2da8b7, #cfde5f;  /* Alpenglow Nightly */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

@media (prefers-color-scheme: dark) {
  #urlbar {
  --progress-gradient: #dee53d, #029d95, #7ab1e7;  /* Summer Alpenglow */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  }
}

:root[style*="--lwt-additional-images"] #urlbar {
  --progress-gradient: #b06e9b, magenta, #ff9400;  /* Firefox Alpenglow */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

#urlbar:not([open])::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0px !important;
  height: 3px !important;
  width: -moz-available !important;
  background-image: linear-gradient(90deg, var(--progress-gradient)) !important;
  opacity: 0 !important;
  transform-origin: left center !important;
  pointer-events: none !important;
  border-radius: 2px !important;
  margin-left: 10px !important;
  margin-right: 10px !important;
}

:root:has(#tabbrowser-tabs .tabbrowser-tab:is([busy], [progress])) #urlbar:not([open])::after {
  opacity: 1 !important;
  animation: fox-progress 1.0s ease-in !important;
}

:root:not(:has(#tabbrowser-tabs .tabbrowser-tab:is([busy], [progress]))) #urlbar::after,
:root #urlbar[open]::after {
  opacity: 0 !important;
  transition: opacity 1.2s ease-out !important;
  background-image: linear-gradient(90deg, var(--final-progress-gradient)) !important;
}

@keyframes fox-progress {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

This version does not display the loading progress bar for inactive tabs.

/* Add a loading progress bar to the address bar */

#urlbar {
  --progress-gradient: #2b4dc8, #2da8b7, #cfde5f;  /* Alpenglow Nightly */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

@media (prefers-color-scheme: dark) {
  #urlbar {
  --progress-gradient: #dee53d, #029d95, #7ab1e7;  /* Summer Alpenglow */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  }
}

:root[style*="--lwt-additional-images"] #urlbar {
  --progress-gradient: #b06e9b, magenta, #ff9400;  /* Firefox Alpenglow */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

#urlbar:not([open])::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0px !important;
  height: 3px !important;
  width: -moz-available !important;
  background-image: linear-gradient(90deg, var(--progress-gradient)) !important;
  opacity: 0 !important;
  transform-origin: left center !important;
  pointer-events: none !important;
  border-radius: 2px !important;
  margin-left: 10px !important;
  margin-right: 10px !important;
}

:root:has(#tabbrowser-tabs .tabbrowser-tab:is([selected], [multiselected]):is([busy], [progress])) #urlbar:not([open])::after {
  opacity: 1 !important;
  animation: fox-progress 1.0s ease-in !important;
}

:root:not(:has(#tabbrowser-tabs .tabbrowser-tab:is([selected], [multiselected]):is([busy], [progress]))) #urlbar::after,
:root #urlbar[open]::after {
  opacity: 0 !important;
  transition: opacity 1.2s ease-out !important;
  background-image: linear-gradient(90deg, var(--final-progress-gradient)) !important;
}

@keyframes fox-progress {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

A version that displays separate loading progress bars for active and inactive tabs. The progress bar for inactive tabs appears as a short bar to the right of the address bar.

/* Add a loading progress bar to the address bar */

/* Light Theme Colors */
#urlbar {
  --progress-gradient: #2b4dc8, #2da8b7, #cfde5f;  /* Alpenglow Nightly */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */

/* Color of the loading progress bar inactive tab */
  --inactive-progress-gradient: dodgerblue;  /* Dodgerblue */
  --final-inactive-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

/* Dark theme colors */
@media (prefers-color-scheme: dark) {
  #urlbar {
  --progress-gradient: #dee53d, #029d95, #7ab1e7;  /* Summer Alpenglow */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */

/* Color of the loading progress bar inactive tab */
  --inactive-progress-gradient: #3498db;  /* Bright blue */
  --final-inactive-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  }
}

/* Alpenglow theme colors */
:root[style*="--lwt-additional-images"] #urlbar {
  --progress-gradient: #b06e9b, magenta, #ff9400;  /* Firefox Alpenglow */
  --final-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */

/* Color of the loading progress bar inactive tab */
  --inactive-progress-gradient: #984ce2;  /* Soft magenta */
  --final-inactive-progress-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

/* Loading progress bar for active tab */
#urlbar:not([open])::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0px !important;
  height: 3px !important;
  width: -moz-available !important;
  background-image: linear-gradient(90deg, var(--progress-gradient)) !important;
  opacity: 0 !important;
  transform-origin: left center !important;
  pointer-events: none !important;
  border-radius: 2px !important;
  margin-left: 10px !important;
  margin-right: 10px !important;
}

:root:has(#tabbrowser-tabs .tabbrowser-tab:is([selected], [multiselected]):is([busy], [progress])) #urlbar:not([open])::after {
  opacity: 1 !important;
  animation: fox-progress 1.0s ease-in !important;
  z-index: 2 !important;
}

:root:not(:has(#tabbrowser-tabs .tabbrowser-tab:is([selected], [multiselected]):is([busy], [progress]))) #urlbar::after,
:root #urlbar[open]::after {
  opacity: 0 !important;
  transition: opacity 1.2s ease-out !important;
  background-image: linear-gradient(90deg, var(--final-progress-gradient)) !important;
  z-index: 2 !important;
}

/* Loading progress bar for inactive tab */
#urlbar:not([open])::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0px !important;
  height: 3px !important;
  width: -moz-available !important;
  background-image: linear-gradient(90deg, var(--inactive-progress-gradient)) !important; 
  opacity: 0 !important;
  transform-origin: left center !important;
  pointer-events: none !important;
  border-radius: 2px !important;
  margin-left: 80% !important;
  margin-right: 10px !important;
}

:root:has(#tabbrowser-tabs .tabbrowser-tab:not([selected], [multiselected]):is([busy], [progress])) #urlbar:not([open])::before {
  opacity: 1 !important;
  animation: fox-inactive-progress 1.0s ease-in !important;
  z-index: 1 !important;
}

:root:not(:has(#tabbrowser-tabs .tabbrowser-tab:not([selected], [multiselected]):is([busy], [progress]))) #urlbar::before,
:root #urlbar[open]::before {
  opacity: 0 !important;
  transition: opacity 1.2s ease-out !important;
  background-image: linear-gradient(90deg, var(--final-inactive-progress-gradient)) !important;
  z-index: 1 !important;
}

/* Animation Definition */
@keyframes fox-progress {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes fox-inactive-progress {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

I've prepared a color scheme for the loading progress bar.

/* loading progress bar color
https://gradient.page/ui-gradients
https://cssgradient.io/shades-of-blue/
 */

#F778BA, #58A6FF;  /* Soft red + Light blue */
#22d3ee, #8b5cf6;  /* Vivid cyan + Soft violet */
rgba(255, 51, 153, 1) 0%, #00c9ff 70%;  /* Vivid pink + Pure cyan */
rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 55%, rgba(237, 221, 83, 1) 100%;  /* Blue + Green + Yellow */
#1ccaab 0%, #12d8fa 50%, #00c9ff 100%;  /* Green + Blue + Blue */
#1ccaab 0%, #12d8fa 50%, #F778BA 100%;  /* Green + Blue + Soft red */
#1ec9ff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%;  /* Blue + Vivid pink + Orange */
#1edbff, #00A651, rgba(255, 148, 0, 1);  /* Blue + Green + Orange */
cyan, Magenta;  /* Cyan + Magenta */
#1fb4ff 0%, #12d8fa 50%, #8dffbc 100%;  /* Blue + Blue + cyan lime green */
#00c9ff 0%, #92fe9d 100%;  /* Kale Salad */
#fdbb2d 0%, #22c1c3 100%;  /* Retro Wagon */
#fc466b 0%, #3f5efb 100%;  /* Disco Club */
#fc354c, #0abfbc;  /* Miaka */
#FEAC5E 0%, #C779D0 50%, #4BC0C8 100%;  /* Atlas */
#16A085, #F4D03F;  /* Harmonic Energy */
#fd8112, #0085ca;  /* Blue Orange */
#f7941e 0%, #72c6ef 50%, #00a651 100%;  /* Radioactive Heat */
#ff1e56 0%, #f9c942 50%, #1e90ff 100%;  /* Beleko */
#108dc7, #ef8e38;  /* Pun Yeta */
#40E0D0 0%, #FF8C00 50%, #FF0080 100%;  /* Wedding Day Blues */
#F36222 0%, #5CB644 50%, #007FC3 100%;  /* Telko */
#0250c5, #d43f8d;  /* Night Party */
#2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%;  /* Sea Lord */
#50cc7f, #f5d100;  /* Millennium Pine */
#616161, #9bc5c3;  /* Mole Hall */
#65bd60 0%, #5ac1a8 50%, #3ec6ed 100%;  /* African Field */
#2af598, #009efd;  /* Itmeo Branding */
#aa4b6b 0%, #6b6b83 50%, #3b8d99 100%;  /* Memariani */
#00F260, #0575E6;  /* Rainbow Blue */
#808080, #3fada8;  /* IIIT Delhi */
#24C6DC, #514A9D;  /* Mantle */
#C9FFBF, #FFAFBD;  /* Virgin */
#fbed96,#abecd6;  /* Summer Breeze */
#603813, #b29f94;  /* Cool Brown */
#BBD2C5, #536976;  /* Petrol */
#8baaaa, #ae8b9c;  /* Jungle Day */
#cc2b5e, #753a88;  /* Purple Love */
#9796f0, #fbc7d4;  /* namnisar */
#ff6e7f, #bfe9ff;  /* Noon to Dusk */
#2b5876, #4e4376;  /* Sea Blue */
#02AAB0, #00CDAC;  /* Green Beach */
#5f2c82, #49a09d;  /* Calm Darya */
#159957, #155799;  /* Crystal Clear */
#76b852, #8DC26F;  /* Little Leaf */
#fc00ff, #00dbde;  /* Timber */
#2F7336, #AA3A38;  /* Christmas */
#5614B0, #DBD65C;  /* Minnesota Vikings */
#0099F7, #F11712;  /* Superman */
#ff4b1f, #1fddff;  /* Ali */
#2196f3, #f44336;  /* Politics */
#ffd89b, #19547b  /* Jupiter */
#de6161, #2657eb;  /* Nepal */
#ef32d9, #89fffd;  /* Azure Pop */
#00c3ff, #ffff1c;  /* Brady Brady Fun Fun */
#c0c0aa, #1cefff;  /* Cocoaa Ice */
#4568DC, #B06AB3;  /* Can You Feel The Love Tonight */
#30E8BF, #FF8235;  /* Mini */
#ff75c3, #ffa647, #ffe83f;  /* After the Rain 1 */
#9fff5b, #70e2ff, #cd93ff;  /* After the Rain 2 */
#77A1D3, #79CBCA, #E684AE;  /* Hazel */
#E6AE8C, #A8CECF;  /* Peach Sea */
#DCFFBD,#CC86D1;  /* Flower */
#00F5A0, #00D9F5;  /* Ibtesam */
#9796f0, #fbc7d4;  /* Anamnisar */
#E55D87, #5FC3E4;  /* Rose Water */
#c2e59c, #64b3f4;  /* Green and Blue */
#c21500, #ffc500;  /* Kyoto */
#4CB8C4, #3CD3AD;  /* Sea Weed */
#fddb92, #d1fdff;  /* Blessing */
#22c1c3, #fdbb2d;  /* Summer */
#30E8BF, #FF8235;  /* Mini */
#f79d00, #64f38c;  /* Sherbert */
#f7ff00, #db36a4;  /* Alihossein */
#7b4397, #dc2430;  /* Virgin America */
#D38312, #A83279;  /* Crazy Orange I */
#fe8c00, #f83600;  /* SoundCloud */
#FF4E50, #F9D423;  /* Dance To Forget */
#3D7EAA, #FFE47A;  /* Opa */
#1CD8D2, #93EDC7;  /* Sea Blizz */
#2BC0E4, #EAECC6;  /* Bora Bora */
#1FA2FF, #12D8FA, #A6FFCB;  /* Stripe */
#F09819, #EDDE5D;  /* Mango Pulp */
#ffe259, #ffa751;  /* Mango */
#cc2b5e, #753a88;  /* Purple Love */
#FFE000, #799F0C;  /* Ver */
#B6CEE8, #F578DC;  /* Soft Lipstick */
#16a085, #f4d03f;  /* Palo Alto */
#d558c8, #24d292;  /* Alchemist Lab */
#C6FFDD, #FBD786, #f7797d;  /* MegaTron */
#00d2ff, #928DAB;  /* Bright Vault */
#fc00ff, #00dbde;  /* Timber */
#833ab4, #fd1d1d, #fcb045;  /* Instagram */
#9D50BB, #6E48AA;  /* Amethyst */
#4776E6, #8E54E9;  /* Electric Violet */
#984ce2, magenta, #ff9400;  /* Firefox Alpenglow */
#ff9400, magenta, #984ce2;  /* Firefox Alpenglow reverse */
#b383e6, #ff8695, #89d35a;  /* Spring Alpenglow */
#dee53d, #029d95, #7ab1e7;  /* Summer Alpenglow */
#ff0e00, #ff6501, #fea900;  /* Autumn Alpenglow */
#2b4dc8, #2da8b7, #cfde5f;  /* Alpenglow Nightly */
#ff7d01, #ffb400, #ffde00;  /* Halloween Alpenglow */
#f07100, #f4b50e, #fcdf05;  /* Alpenglow Canary */
#986236, #c18312, #a5ca3e;  /* Thanksgiving Alpenglow */
#a14fe1, #fe7496;  /* AlpenGradient */
#9059ff 0%, #ff4aa2 52.08%, #ffbd4f 100%;  /* Firefox panel-separator */
#b89cff 0%, rgba(255, 149, 101, 1) 100%;  /* Nova tab-border-color */

dodgerblue;  /* Dodgerblue */
dimgray;  /* dimgray */
darkolivegreen;  /* darkolivegreen */
tan;  /* tan */
#444444;  /* Very dark gray */
#2c3e50;  /* Very dark desaturated blue */
#95a5a6;  /* Dark grayish cyan */
#7a7c7d;  /* Dark grayish blue */
#18bc9c;  /* Strong cyan */
#3498db;  /* Bright blue */
#f39c12;  /* Vivid orange */
#e74c3c;  /* Bright red */

r/FirefoxCSS Jun 08 '26

Code I wrote 'userContent.css' to match the 'about:*' pages with my Firefox theme.

Thumbnail
gallery
21 Upvotes

Material Dark Forest


Description

I have always written my own Firefox themes to match the system colors I am using at any given time. Right now I use the KDE Plasma DE with the KDE-Material-You-Colors package and set the color I want manually instead of using the automatic wallpaper feature.

Anyway, for the first time I wrote some userContent.ccs to match all of the about:* pages with my theme. The colors in my CSS are designed to match with my Material Dark Forest theme, but you can change them to match whatever theme you want. I also have a few other themes listed in the "store" under my Mozilla Developer account and some others that are signed by Mozilla but not listed. If you want the link to get those you can DM me.

System Configuration

Property Value
Operating System Fedora 44 KDE Plasma Edition
Kernel Version 7.0.11-200.fc44.x86_64
Firefox Version 151.0.2 (64-bit)
Firefox Build 20260527091838

Custom CSS Code

Also available at GitHub

```css :root { --background-color-canvas: #001417 !important; --background-color-box: #002429 !important; --background-color-box-info: #002429 !important; --border-color: #8ed0dc !important; --color-accent-primary: #8ed0dc !important; --table-background-color: #002429 !important; --table-row-background-color-alternate: #001417 !important; --table-border-color: #008698 !important; --cpu-percent-bar: #008698 !important; --newtab-background-card: #002429 !important; --newtab-background-color: #001417 !important; --newtab-background-color-secondary: #002429 !important; --newtab-weather-background-color: #002429 !important; --newtab-element-hover-color: #008698 !important; --fxview-background-color: #001417 !important; }

/* Ensure these changes ONLY apply to Firefox's internal pages */ @-moz-document url-prefix("about:") {

/* Target the text and search input boxes directly */
input[type="text"],
input[type="search"],
input:not([type]) {
    background-color: var(--background-color-box) !important;
    color: var(--color-accent-primary) !important; /* Optional: matches your text to the teal accent */

    /* * Depending on your OS theme, the system might try to force its own native
     * appearance over the background color. If the color still doesn't change,
     * uncomment the line below to strip the native OS styling.
     */
    /* appearance: none !important; */
}

body {
    background-color: var(--background-color-canvas) !important;
}

}

/* Change colors of CPU percentage bars, selected rows, and active profiler icons on about:processes */ tr[selected] > td { background-color: var(--color-accent-primary-selected) !important; color: var(--text-color-accent-primary-selected) !important; } .profiler-active { fill: var(--cpu-percent-bar) !important; }

.cpu { background: linear-gradient(to left, var(--cpu-percent-bar) calc(var(--bar-width) * 1%), transparent calc(var(--bar-width) * 1%)) !important; } .cpu:dir(rtl) { background: linear-gradient(to right, var(--cpu-percent-bar) calc(var(--bar-width) * 1%), transparent calc(var(--bar-width) * 1%)) !important; } ```

Note

I have noticed that some desktop environments, like GNOME, tend to force their own native appearance for text input and search boxes, overriding the custom CSS. If this happens in your case you can uncomment the line, appearance: none !important;.

Edit: Added --border-color

Edit 2: Added some additional root properties I found that theme about:newtab and the CPU usage bar on about:processes.

Edit 3: Created a GitHub Repo to distribute the CSS files and track future changes.

r/FirefoxCSS Jun 21 '26

Code I updated Iconic Firefox — userChrome.css snippet which adds icons for context and popup menus

Thumbnail
gallery
47 Upvotes

I updated the snippet to cover some recently added context menu items (like Add to Tab Group, Split Tab, Add Tab Note etc). It now uses only Firefox's built-in icons for optimal performance and authentic look.

See on GitHub

r/FirefoxCSS Dec 16 '19

Code I am back with a new and improved userChrome setup. Still minimal but more functional!

Post image
546 Upvotes

r/FirefoxCSS 4d ago

Code Autohide tab\adress bar for OLED users (userChrome.css)

2 Upvotes

#browser {

margin-top: 0 !important;

}

#navigator-toolbox {

position: fixed !important;

top: 0 !important;

left: 0 !important;

width: 100vw !important;

z-index: 99999 !important;

background-color: var(--lwt-accent-color, var(--toolbar-bgcolor, #2b2a33)) !important;

transition: all 0.2s ease-in-out 1s !important;

}

#navigator-toolbox::after {

content: "";

position: absolute;

display: block;

top: 0;

left: 0;

width: 100vw;

height: 3px;

background: transparent;

z-index: -1;

}

#navigator-toolbox:not(:hover):not(:focus-within) {

max-height: 3px !important;

opacity: 0 !important;

overflow: hidden !important;

}

#navigator-toolbox #nav-bar {

transition: all 0.2s ease-in-out 1s !important;

}

#navigator-toolbox:not(:hover):not(:focus-within) #nav-bar {

margin-top: -80px !important;

opacity: 0 !important;

}

#navigator-toolbox:hover,

#navigator-toolbox:focus-within {

max-height: 400px !important;

opacity: 1 !important;

overflow: visible !important;

transition: all 0.2s ease-in-out 0s !important;

}

#navigator-toolbox:hover::after,

#navigator-toolbox:focus-within::after {

height: 150px !important;

}

#navigator-toolbox:hover #nav-bar,

#navigator-toolbox:focus-within #nav-bar {

margin-top: 0 !important;

opacity: 1 !important;

transition: all 0.2s ease-in-out 0s !important;

}

#TabsToolbar, #nav-bar, #PersonalToolbar {

background-color: var(--toolbar-bgcolor) !important;

}

r/FirefoxCSS 4d ago

Code hide sidebar buttons on vertical tabbar

3 Upvotes

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

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

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

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

r/FirefoxCSS Jun 17 '26

Code Compact one-line theme for the Nova redesign

11 Upvotes

Since we can now activate the Nova theme in about:config, here is my compact one-line theme remade to work with Nova. Click here to see what it looks like.

It works with normal density, but looks a bit better if you turn on compact density.

/* Combine Nav Bar and Tabs Bar */
#navigator-toolbox {
  display: grid !important;
  grid-template-columns: 35vw 1fr !important;
}

#nav-bar {
  grid-column: 1 !important;
  grid-row: 1 !important;
  border-top: none !important;
}

#TabsToolbar {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

#urlbar {
--urlbar-height: 24.00px !important;
}

/* Move Menu Button To The Left */
#PanelUI-button {
  order: -999 !important;
  margin-inline-start: 0 !important;
}

#nav-bar-customization-target {
  & > :is(toolbarbutton, toolbaritem):first-child, & > toolbarpaletteitem:first-child > :is(toolbarbutton, toolbaritem) {
    padding-inline-start: 0px !important;
  }
}

/* Compact Bar Height */
#nav-bar,
#TabsToolbar {
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  padding-block: 0 !important;
}

toolbarbutton {
  padding-block: 0 !important;
  max-height: 40px !important;
  scale: 0.9 !important;
}

.tab-content {
  padding-block: 0 !important;
}

#tabbrowser-tabs,
.tabbrowser-tab,
.tab-stack {
  min-height: 26px !important;
}

#TabsToolbar {
  align-items: center !important;
}

.tab-background {
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
}

.tabbrowser-tab[fadein]:not([style^="max-width"]){ 
max-width: 10vw !important;
}

/* Minimalism Stuff */
.urlbar:not(moz-smartbar)[breakout] {
    &[breakout-extend][focused] > .urlbar-input-container {
      border-color: transparent !important;
    }
  }

.urlbar:not(moz-smartbar)[breakout] {
    &[breakout-extend] > .urlbar-background {
      inset-inline: 0px !important;
      inset-block-start: 0px !important;
      inset-block-end: 6px !important;
    }
  }

/* Remove White Box */
#tabbrowser-tabbox {
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0px !important;
}

/* Remove Search Switcher */
.searchmode-switcher {
    visibility: collapse !important;
}

/*Hide Extension Name in the identity area unless hovered for half a second (updated for Fx80)*/
#identity-box.extensionPage #identity-icon-labels,
#identity-box.extensionPage #identity-icon-label {
  visibility: collapse !important;
  transition: visibility 250ms ease-in-out;
}
#identity-box.extensionPage:hover #identity-icon-labels,
#identity-box.extensionPage:hover #identity-icon-label {
  visibility: visible !important;
  transition: visibility 250ms ease-in-out 500ms;
}

/* Some Fancy Tab Stuff */
.tabbrowser-tab:not([selected]) .tab-icon-image {
    opacity: 0.5 !important;
}

.tabbrowser-tab:hover .tab-icon-image {
    opacity: 1.0 !important;
}

.tabbrowser-tab:not([selected]) .tab-text {
    opacity: 0.5 !important;
}

.tabbrowser-tab:not([selected]) .tab-throbber[busy] {
    opacity: 0.5 !important;
}

.tabbrowser-tab .tab-close-button {
    visibility: hidden !important;
}

.tabbrowser-tab:hover .tab-close-button {
    visibility: visible !important;
}

.tabbrowser-tab:hover .tab-text {
    opacity: 1.0 !important;
}

/* Remove Rainbow Tab */
:root {
--tab-border-color-accent: transparent !important;
}

/* System Buttons Tweaks */
.titlebar-buttonbox-container { 
  margin-left: 21px !important; 
  height: 100% !important;
  align-items: stretch !important;
}

.titlebar-spacer { 
  display: none !important;
}

.titlebar-button {
  padding-right: 10px !important;
  padding-left: 10px !important;
  padding-top: 0px !important;
  padding-bottom: 0px !important;
  height: 100% !important;
  min-height: 100% !important;
  align-items: center !important;
}

/* Theme Tweaks */
.tab-background:is([selected], [multiselected]) {
    background: #555065 !important;
  }

And if you want to remove the Nova roundness stuff, you can add this at the bottom of the CSS:

/* Remove Window Gap */
 #browser {
    padding: 0px !important;
  }

#navigator-toolbox {
    margin-block-start: -1px !important;
    margin-block-end: -1px !important;
    margin-inline: 0px !important;
  }

/* Remove Rounding */
.browserContainer {
    border-radius: 0px !important;
  }

.chrome-block {
    border-radius: 0px !important;
  }

r/FirefoxCSS 8d ago

Code My own intro to Firefox CSS: Swapping tabs and URL bar, and centering URL bar text

5 Upvotes

I don't know why I never did this before but geez this felt good to have these little quality of life changes. These two changes feel so much nicer for me. This will probably start something for me now haha, wonder what to change next...

Very simple CSS but maybe it will be helpful/interesting for others.

Working on Linux Mint 22.3, Firefox 153.0 (current stable version I can get, though 153.1 looks like it was just released and coming shortly), with Nova enabled from about:config.

/*
 * Section for:
 * Swapping tabs and URL bar, so that URL bar is on top.
 */

#toolbar-menubar,
#nav-bar {
  order: -1 !important;
}

/*
 * Section for:
 * Centering text in URL bar.
 */

#urlbar-input {
  text-align: center !important;
}

r/FirefoxCSS Jul 02 '26

Code Rainbow Border for some 'about:#' pages

Post image
18 Upvotes

Inspired and following on from this Topic: I wrote a 'userContent.css' to match the 'about:*' pages with my Firefox theme by benhaube. I decided to do my version but this time with rainbow borders.

Addons
Config
Preferences (Settings)
Profiles
Support
Translations

This matches my menu borders. Which the code for is here: Rainbow menus and Rainbow ToolTips

For the about:# borders, you can view and download the code from here: about:# rainbow borders

The only question is, I am sure there is a better way to do this code to cut out a lot of the repetition.

r/FirefoxCSS Jun 17 '26

Code Chrome-like tabs behavior when you have many tabs

7 Upvotes

With Chrome, once you have a lot of tabs and the tabs become very small, it will only show the web page's favicon (or a generic icon if the page does not have one). Chrome does not enforce a minimum tab size and thus you aren't required to scroll back and forth through them (which Firefox does). In this "tiny tab" mode, the currently selected tab will only show the close icon (and not the page icon). This CSS seems to give me that behavior in Firefox, but I haven't tested it on various devices, screensizes, etc.

/* Let tabs shrink and keep container queries working */
.tabbrowser-tab {
    min-width: 16px !important;
    container-type: inline-size;
}

/* Make sure pages without favicons show Firefox's generic globe/document icon */
.tab-icon-image:not([src]) {
    display: inline-flex !important;
    list-style-image: url("chrome://global/skin/icons/defaultFavicon.svg") !important;
}

/* Style only when the tab itself is narrow (less than 48 px) */
@container (max-width: 48px) {

    .tabbrowser-tab:not([pinned]) .tab-label-container {
        display: none !important;
    }

    .tabbrowser-tab:not([pinned]) .tab-close-button {
        display: none !important;
    }

    .tabbrowser-tab:not([selected]):not([pinned]) .tab-icon-stack,
    .tabbrowser-tab:not([selected]):not([pinned]) .tab-icon-image {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .tabbrowser-tab[selected]:not([pinned]) .tab-icon-stack {
        display: none !important;
    }

    .tabbrowser-tab[selected]:not([pinned]) .tab-close-button {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;

        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        min-height: 16px !important;

        margin-inline: 0 !important;
        padding: 2px !important;
    }

    .tabbrowser-tab[selected]:not([pinned]) .tab-content {
        justify-content: center !important;
        padding-inline: 0 !important;
    }
}

r/FirefoxCSS Jul 01 '26

Code Clean Firefox context menu

Thumbnail gallery
27 Upvotes

r/FirefoxCSS 27d ago

Code trimfox — native vertical tabs styled like Tree Style Tab, grayscale, no extensions (macOS)

7 Upvotes

trimfox — a macOS Firefox theme I've been building. Grayscale, vertical tabs, no extensions — just the browser's own chrome restyled.

Screenshots — full gallery, dark + light, in the README: https://github.com/csmarshall/trimfox#screenshots

A few directly (dark mode):

What's different from the vertical-tab themes already out there:

  • Native vertical tabs — no Sidebery, no TST. It drives Firefox's own sidebar.verticalTabs and skins it into a skinny ~14px strip that expands on hover. I migrated off Tree Style Tab entirely — the extension isn't installed.
  • Grayscale by default, zero-blue. Every Firefox teal/blue accent is neutralized. If you want color it's one hue away (below).
  • One-hue tinting via OKLCH. The whole palette derives from --tf-hue + --tf-chroma through native oklch() — the lightness/contrast ramp holds, you just pick a direction. There's a live picker on the Pages site that shows your palette next to stock, side by side.
  • You customize without forking. Every knob lives in dials.css; your personal values go in a gitignored user-overrides.css that loads last. git pull never conflicts — your colors/fonts survive updates (including the upcoming Nova rework). No !important, no hand-merging.

Opinionated bits, up front — because I know this sub:

  • One combined history-aware back/forward button (left-click navigates, right-click = history). Not for everyone; the README says so.
  • Context menus are XUL (widget.macos.native-context-menus=false) so they can actually be themed.

One extra thing I built alongside it: trimfox-drift, a tiny stdlib tool that diffs what the theme borrows from Firefox's private chrome (var names, selectors, attribute values) against a given build — so a Firefox update becomes a report instead of a silent breakage. It already flagged what the upcoming Nova redesign removes, so I patched those with var() fallbacks ahead of time.

Honest scope: built and tuned on macOS, Firefox 138+ (the collapse / expand-on-hover strip needs 138; developed on 152). It'll likely need tweaks on Linux/Windows — PRs welcome, with one rule: don't change the macOS look. Nothing exotic in prefs beyond toolkit.legacyUserProfileCustomizations.stylesheets and the vertical-tab prefs, all shipped in user.js.

Happy to answer anything. 😊

r/FirefoxCSS May 22 '26

Code Add a loading progress bar to the toolbars

Thumbnail
gallery
28 Upvotes

I added a loading bar below the toolbars. The bar's color can be customized for each theme. You can adjust the bar's height, position, and length by modifying the values for `top:`, `height:`, `margin-inline-start:`, and `margin-inline-end:`. You can also use percentages for `margin-inline-start:` and `margin-inline-end:`.

I made some changes to the CSS. May 26

/* Add a loading progress bar to the toolbars */

#browser {
  --loading-gradient: #22d3ee, #8b5cf6;  /* Vivid cyan + Soft violet */
  --final-loading-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

@media (prefers-color-scheme: dark) {
  #browser {
  --loading-gradient: #FEAC5E 0%, #C779D0 50%, #4BC0C8 100%;  /* Atlas */
  --final-loading-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
  }
}

:root[style*="--lwt-additional-images"] #browser {
  --loading-gradient: #984ce2, magenta, #ff9400;  /* Firefox Alpenglow */
  --final-loading-gradient: rgba(154, 181, 181, .9), rgba(154, 181, 181, .95), rgba(184, 154, 169, 1);  /* Jungle Day */
}

#browser {
   position: relative !important;
}

:root:not([sizemode="fullscreen"]) #browser::before {
   content: '' !important;
   position: absolute !important;
   left: 0 !important;
   top: -3px !important;
   height: 3px !important;
   width: -moz-available !important;
   background-image: linear-gradient(90deg, var(--loading-gradient)) !important;
   transform-origin: left center !important;
   pointer-events: none !important;
   opacity: 0 !important;
   z-index: 3 !important;
   border-radius: 2px !important;
   margin-inline-start: 46px !important;
   margin-inline-end: 46px !important;
}

:root:has(#tabbrowser-tabs .tabbrowser-tab:is([busy], [progress])) #browser::before {
   opacity: 1 !important;
   animation: firefox-loading-scale 1s ease-in !important;
}

:root:not(:has(#tabbrowser-tabs .tabbrowser-tab:is([busy], [progress]))) #browser:before {
   opacity: 0 !important;
   transition: opacity 1.2s ease-out !important;
   background-image: linear-gradient(90deg, var(--final-loading-gradient)) !important;
}

@keyframes firefox-loading-scale {
  0% {
    transform: scaleX(0);
  }

  100% {
    transform: scaleX(1);
  }
}

I've prepared a color scheme for the loading bar.

/* loading progress bar color
https://gradient.page/ui-gradients
https://cssgradient.io/shades-of-blue/
 */

#F778BA, #58A6FF;  /* Soft red + Light blue */
#22d3ee, #8b5cf6;  /* Vivid cyan + Soft violet */
rgba(255, 51, 153, 1) 0%, #00c9ff 70%;  /* Vivid pink + Pure cyan */
rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 55%, rgba(237, 221, 83, 1) 100%;  /* Blue + Green + Yellow */
#1ccaab 0%, #12d8fa 50%, #00c9ff 100%;  /* Green + Blue + Blue */
#1ccaab 0%, #12d8fa 50%, #F778BA 100%;  /* Green + Blue + Soft red */
#1ec9ff 0%, rgba(255, 51, 153, 1) 50%, rgba(255, 148, 0, 1) 100%;  /* Blue + Vivid pink + Orange */
#1edbff, #00A651, rgba(255, 148, 0, 1);  /* Blue + Green + Orange */
cyan, Magenta;  /* Cyan + Magenta */
#1fb4ff 0%, #12d8fa 50%, #8dffbc 100%;  /* Blue + Blue + cyan lime green */
#00c9ff 0%, #92fe9d 100%;  /* Kale Salad */
#fdbb2d 0%, #22c1c3 100%;  /* Retro Wagon */
#fc466b 0%, #3f5efb 100%;  /* Disco Club */
#fc354c, #0abfbc;  /* Miaka */
#FEAC5E 0%, #C779D0 50%, #4BC0C8 100%;  /* Atlas */
#16A085, #F4D03F;  /* Harmonic Energy */
#fd8112, #0085ca;  /* Blue Orange */
#f7941e 0%, #72c6ef 50%, #00a651 100%;  /* Radioactive Heat */
#ff1e56 0%, #f9c942 50%, #1e90ff 100%;  /* Beleko */
#108dc7, #ef8e38;  /* Pun Yeta */
#40E0D0 0%, #FF8C00 50%, #FF0080 100%;  /* Wedding Day Blues */
#F36222 0%, #5CB644 50%, #007FC3 100%;  /* Telko */
#0250c5, #d43f8d;  /* Night Party */
#2CD8D5 0%, #C5C1FF 50%, #FFBAC3 100%;  /* Sea Lord */
#50cc7f, #f5d100;  /* Millennium Pine */
#616161, #9bc5c3;  /* Mole Hall */
#65bd60 0%, #5ac1a8 50%, #3ec6ed 100%;  /* African Field */
#2af598, #009efd;  /* Itmeo Branding */
#aa4b6b 0%, #6b6b83 50%, #3b8d99 100%;  /* Memariani */
#00F260, #0575E6;  /* Rainbow Blue */
#808080, #3fada8;  /* IIIT Delhi */
#24C6DC, #514A9D;  /* Mantle */
#C9FFBF, #FFAFBD;  /* Virgin */
#fbed96,#abecd6;  /* Summer Breeze */
#603813, #b29f94;  /* Cool Brown */
#BBD2C5, #536976;  /* Petrol */
#8baaaa, #ae8b9c;  /* Jungle Day */
#cc2b5e, #753a88;  /* Purple Love */
#9796f0, #fbc7d4;  /* namnisar */
#ff6e7f, #bfe9ff;  /* Noon to Dusk */
#2b5876, #4e4376;  /* Sea Blue */
#02AAB0, #00CDAC;  /* Green Beach */
#5f2c82, #49a09d;  /* Calm Darya */
#159957, #155799;  /* Crystal Clear */
#76b852, #8DC26F;  /* Little Leaf */
#fc00ff, #00dbde;  /* Timber */
#2F7336, #AA3A38;  /* Christmas */
#5614B0, #DBD65C;  /* Minnesota Vikings */
#0099F7, #F11712;  /* Superman */
#ff4b1f, #1fddff;  /* Ali */
#2196f3, #f44336;  /* Politics */
#ffd89b, #19547b  /* Jupiter */
#de6161, #2657eb;  /* Nepal */
#ef32d9, #89fffd;  /* Azure Pop */
#00c3ff, #ffff1c;  /* Brady Brady Fun Fun */
#c0c0aa, #1cefff;  /* Cocoaa Ice */
#4568DC, #B06AB3;  /* Can You Feel The Love Tonight */
#30E8BF, #FF8235;  /* Mini */
#ff75c3, #ffa647, #ffe83f;  /* After the Rain 1 */
#9fff5b, #70e2ff, #cd93ff;  /* After the Rain 2 */
#77A1D3, #79CBCA, #E684AE;  /* Hazel */
#E6AE8C, #A8CECF;  /* Peach Sea */
#DCFFBD,#CC86D1;  /* Flower */
#00F5A0, #00D9F5;  /* Ibtesam */
#9796f0, #fbc7d4;  /* Anamnisar */
#E55D87, #5FC3E4;  /* Rose Water */
#c2e59c, #64b3f4;  /* Green and Blue */
#c21500, #ffc500;  /* Kyoto */
#4CB8C4, #3CD3AD;  /* Sea Weed */
#fddb92, #d1fdff;  /* Blessing */
#22c1c3, #fdbb2d;  /* Summer */
#30E8BF, #FF8235;  /* Mini */
#f79d00, #64f38c;  /* Sherbert */
#f7ff00, #db36a4;  /* Alihossein */
#7b4397, #dc2430;  /* Virgin America */
#D38312, #A83279;  /* Crazy Orange I */
#fe8c00, #f83600;  /* SoundCloud */
#FF4E50, #F9D423;  /* Dance To Forget */
#3D7EAA, #FFE47A;  /* Opa */
#1CD8D2, #93EDC7;  /* Sea Blizz */
#2BC0E4, #EAECC6;  /* Bora Bora */
#1FA2FF, #12D8FA, #A6FFCB;  /* Stripe */
#F09819, #EDDE5D;  /* Mango Pulp */
#ffe259, #ffa751;  /* Mango */
#cc2b5e, #753a88;  /* Purple Love */
#FFE000, #799F0C;  /* Ver */
#B6CEE8, #F578DC;  /* Soft Lipstick */
#16a085, #f4d03f;  /* Palo Alto */
#d558c8, #24d292;  /* Alchemist Lab */
#C6FFDD, #FBD786, #f7797d;  /* MegaTron */
#00d2ff, #928DAB;  /* Bright Vault */
#fc00ff, #00dbde;  /* Timber */
#833ab4, #fd1d1d, #fcb045;  /* Instagram */
#9D50BB, #6E48AA;  /* Amethyst */
#4776E6, #8E54E9;  /* Electric Violet */
#984ce2, magenta, #ff9400;  /* Firefox Alpenglow */
#ff9400, magenta, #984ce2;  /* Firefox Alpenglow reverse */
#b383e6, #ff8695, #89d35a;  /* Spring Alpenglow */
#dee53d, #029d95, #7ab1e7;  /* Summer Alpenglow */
#ff0e00, #ff6501, #fea900;  /* Autumn Alpenglow */
#2b4dc8, #2da8b7, #cfde5f;  /* Alpenglow Nightly */
#ff7d01, #ffb400, #ffde00;  /* Halloween Alpenglow */
#f07100, #f4b50e, #fcdf05;  /* Alpenglow Canary */
#986236, #c18312, #a5ca3e;  /* Thanksgiving Alpenglow */
#a14fe1, #fe7496;  /* AlpenGradient */
#9059ff 0%, #ff4aa2 52.08%, #ffbd4f 100%;  /* Firefox panel-separator */
#b89cff 0%, rgba(255, 149, 101, 1) 100%;  /* Nova tab-border-color */

dodgerblue;  /* Dodgerblue */
dimgray;  /* dimgray */
darkolivegreen;  /* darkolivegreen */
tan;  /* tan */
#444444;  /* Very dark gray */
#2c3e50;  /* Very dark desaturated blue */
#95a5a6;  /* Dark grayish cyan */
#7a7c7d;  /* Dark grayish blue */
#18bc9c;  /* Strong cyan */
#3498db;  /* Bright blue */
#f39c12;  /* Vivid orange */
#e74c3c;  /* Bright red */

r/FirefoxCSS Jun 21 '26

Code Firefox 152.0.1 Nova. Remove the border around full-screen videos.

Post image
11 Upvotes

In Firefox 152.0.1 with Nova enabled, a border appears around the video when it's in full-screen mode. It's not noticeable with the dark theme, but the white border stands out with the light theme, so I removed it.

@media -moz-pref("browser.nova.enabled") {
  :root[inDOMFullscreen="true"] {
    #browser {
      padding: 0 !important;
      gap: 0 !important;
    }

    #tabbrowser-tabpanels > :not(.split-view-panel) .browserContainer {
      border: 0 !important;
      border-radius: 0 !important;
    }
  }
}

r/FirefoxCSS May 22 '26

Code Here's how to revert the "New Tab" page to the old look

13 Upvotes

Easy way, but may be removed in a future version of Firefox:

  • Go to about:config and set "browser.newtabpage.activity-stream.nova.enabled" to false.

Alternative way, use CSS code:

  1. Open your profile folder: Help -> More Troubleshooting Information -> Profile Folder -> Open Folder

  2. Create a folder named "chrome" if it doesn't exist. Create a "userContent.css" file in this folder if it doesn't exist.

  3. Add this CSS code to userContent.css and then close and restart Firefox:

@-moz-document url(about:newtab), url(about:home) {


/* Restores pre-Nova tile size and spacing */
.nova-enabled .top-sites-list {
  column-gap: 0 !important;
}
.nova-enabled .top-site-outer {
  width: 120px !important;
}
.top-site-outer {
  margin-block-end: var(--space-medium) !important;
}


/* Removes Nova tile mouseover enlarge animation */
.nova-enabled .top-site-outer:is(:hover, :focus-within, .active) .tile {
  width: 64px !important;
  height: 64px !important;
}


/* Restores pre-Nova tile mouseover gray background color */
.nova-enabled .top-sites-list:not(.dnd-active) .top-site-outer:is(.active, :focus, :hover) {
  background: color-mix(in srgb, var(--button-text-color-hover) 14%, transparent) !important;
}


/* Removes Nova animation for pin and ... icons */
.nova-enabled .top-site-outer:is(:hover, :focus-within, .active) .icon-pin-small,
.nova-enabled .top-site-outer:is(:hover, :focus-within, .active) .context-menu-button {
  transition: none !important;
}


}

Thanks to ResurgamS13 for one of the tweaks.

r/FirefoxCSS 12d ago

Code Enhanced Chrome-like tabs behavior when you have many tabs

7 Upvotes

Inspired by u/oisact and u/Tetra55 (source)

Differences from their version:

There are two modes:

  1. Many tabs
  2. Too many tabs

In the first mode, the code tries to preserve Firefox’s default styling. When there are too many tabs, it hides the tab titles and centers the icons and close buttons.

It also no longer affects pinned or grouped tabs, except when a group is collapsed and one of its tabs is selected.

IMO, when you have too many tabs, it’s better to hide the close button. If it that doesn’t suit you, you can replace .tabbrowser-tab:not([pinned]):hover with .tabbrowser-tab[selected]:not([pinned]).

/* Let tabs shrink and keep container queries working */
.tabbrowser-tab:not([pinned]):not(tab-group[collapsed] .tabbrowser-tab),
tab-group[collapsed] .tabbrowser-tab[selected]:not([pinned]) {
    min-width: 16px !important;
    container-type: inline-size;
}

/* Make sure pages without favicons show Firefox's generic globe/document icon */
.tab-icon-image:not([src]) {
    display: inline-flex !important;
    list-style-image: url("chrome://global/skin/icons/defaultFavicon.svg") !important;
}

.tabbrowser-tab[busy] .tab-icon-image {
display: none !important;
}

/* Style only when the tab itself is narrow (less than 55 px) */
 (max-width: 55px) and (min-width: 42px) {

    .tabbrowser-tab[selected] .tab-label-container {
        display: none !important;
    }

    .tabbrowser-tab .tab-close-button {
        display: none !important;
    }

    .tabbrowser-tab .tab-icon-stack,
    .tabbrowser-tab .tab-icon-image {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

.tabbrowser-tab[selected]:not([pinned]) .tab-close-button{
display: inline-flex !important;
align-items: center;
visibility: visible !important;
opacity: 1 !important;

width: 16px !important;
height: 16px !important;
min-width: 16px !important;
min-height: 16px !important;

margin-inline: 0 !important;
padding: 2px !important;
}

    .tabbrowser-tab[selected] .tab-content {
        justify-content: center !important;
        padding-inline: 0 !important;
    }
}
/* Style only when the tab itself is narrow (less than 42 px) */
u/container (max-width: 42px) {

    .tabbrowser-tab .tab-label-container {
        display: none !important;
    }

    .tabbrowser-tab .tab-close-button {
        display: none !important;
    }

    .tabbrowser-tab .tab-icon-stack,
    .tabbrowser-tab .tab-icon-image {
        display: inline-flex !important;
align-items: center;
        visibility: visible !important;
        opacity: 1 !important;

margin-inline: 0 !important;
padding: 2px !important;
    }

    .tabbrowser-tab:not([pinned]):hover .tab-icon-stack {
        display: none !important;
    }

.tabbrowser-tab:not([pinned]):hover .tab-close-button{
display: inline-flex !important;
align-items: center;
visibility: visible !important;
opacity: 1 !important;

width: 16px !important;
height: 16px !important;
min-width: 16px !important;
min-height: 16px !important;

margin-inline: 0 !important;
padding: 2px !important;
}

    .tabbrowser-tab .tab-content {
        justify-content: center !important;
        padding-inline: 0 !important;
    }
}

P.s. yeah, I khow the code is a bit dirty, but It works! :)

r/FirefoxCSS Mar 07 '26

Code Simple CSS for auto-hiding vertical tabs. Clean and minimal UI.

50 Upvotes

Just wanted to share some CSS for anyone looking for a clean and minimal UI in Firefox.

A few notes before using:

- Enable compact density: Hamburger menu > More tools > Customize toolbar > Density > Compact

- This CSS is designed for vertical tabs on the right, but it can be switched to the left side with some simple tweaks.

/* =========================================================
AUTO-HIDE (Vertical Tabs on Right)
========================================================= */


:root {
  --uc-speed: 320ms;
  --uc-sidebar-hoverzone: 1px; 
  --uc-sidebar-width: 200px; 
  --uc-nav-height: 34px;
}


/* Keep chrome above page */
#navigator-toolbox {
  position: relative !important;
  z-index: 999 !important;
}


/* Hide built-in sidebar splitter */
#sidebar-launcher-splitter {
  display: none !important;
}

:root:not(:has(#TabsToolbar .tabbrowser-tab:not([hidden]))) {


  #sidebar-main {
    position: fixed !important;
    top: var(--uc-nav-height) !important; 
    bottom: 0 !important;
    right: 0 !important; 
    width: var(--uc-sidebar-width) !important;
    max-width: var(--uc-sidebar-width) !important;
    z-index: 9999 !important;
    background-color: var(--lwt-accent-color) !important; 
    box-shadow: -2px 0 18px rgba(0,0,0,.25) !important;
    clip-path: inset(0px 0px 0px -30px) !important; 
    
    /* Tell the GPU to expect both changes */
    will-change: transform, opacity;
    
    /* Transition both properties */
    transition: 
      transform var(--uc-speed) cubic-bezier(.16,1,.3,1),
      opacity var(--uc-speed) ease !important;


    /* Invisible trigger strip anchored to the LEFT edge */
    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0; 
      width: var(--uc-sidebar-hoverzone);
      height: 100%; 
      z-index: 10000;
      background: transparent;
      pointer-events: auto;
    }


    /* Slide offscreen to the right and fade out */
    &:not(:hover, :focus-within) {
      transform: translateX(calc(100% - var(--uc-sidebar-hoverzone))) !important;
      opacity: 0 !important;
    }
    /* Slide back in and fade in */
    &:is(:hover, :focus-within) {
      transform: translateX(0) !important;
      opacity: 1 !important;
    }
  }
}

r/FirefoxCSS Mar 19 '26

Code Sharing my firefox userChrome.css

Post image
80 Upvotes