Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Learn More

userChrome.css is not being applied

  • 2 odpowiedzi
  • 1 osoba ma ten problem
  • 1 wyświetlenie
  • Ostatnia odpowiedź od cor-el

more options

I am trying to have Firefox show an "X" on every tab as soon as I hover above it. I followed a certain article and implemented this code:

/* Show Tab Close buttons only when hovered */

  1. tabbrowser-tabs > .tabbrowser-tab:not([pinned="true"]) > .tab-stack > .tab-content > .tab-close-button {
 visibility: collapse !important;
 opacity: 0 !important;
 transition: all 250ms ease-in-out !important;

}

  1. tabbrowser-tabs > .tabbrowser-tab:not([pinned="true"]):hover > .tab-stack > .tab-content > .tab-close-button {
 visibility: visible !important;
 opacity: 1 !important;
 transition: all 250ms ease-in-out !important;;

}

  1. tabbrowser-tabs > .tabbrowser-tab:not([pinned="true"]) > .tab-stack > .tab-content > .tab-close-button {
 display: -moz-box !important;

}


This code is however not being implemented no matter how many times I restart Firefox. 'toolkit.legacyUserProfileCustomizations.stylesheets' is set to True The location is userChrome.css is '/home/user1/.mozilla/firefox/yqomjsh9.default-release-1672744596809/chrome/userChrome.css'

What could be the issue? I tried adding executable permissions using "chmod" but that did not change anything.

I am trying to have Firefox show an "X" on every tab as soon as I hover above it. I followed a certain article and implemented this code: /* Show Tab Close buttons only when hovered */ #tabbrowser-tabs > .tabbrowser-tab:not([pinned="true"]) > .tab-stack > .tab-content > .tab-close-button { visibility: collapse !important; opacity: 0 !important; transition: all 250ms ease-in-out !important; } #tabbrowser-tabs > .tabbrowser-tab:not([pinned="true"]):hover > .tab-stack > .tab-content > .tab-close-button { visibility: visible !important; opacity: 1 !important; transition: all 250ms ease-in-out !important;; } #tabbrowser-tabs > .tabbrowser-tab:not([pinned="true"]) > .tab-stack > .tab-content > .tab-close-button { display: -moz-box !important; } This code is however not being implemented no matter how many times I restart Firefox. 'toolkit.legacyUserProfileCustomizations.stylesheets' is set to True The location is userChrome.css is '/home/user1/.mozilla/firefox/yqomjsh9.default-release-1672744596809/chrome/userChrome.css' What could be the issue? I tried adding executable permissions using "chmod" but that did not change anything.

Wybrane rozwiązanie

Try to keep the code simple and do not try to add all nodes (you missed #tabbrowser-arrowscrollbox).

/* Show Tab Close buttons only when hovered */
#tabbrowser-tabs .tabbrowser-tab:not([pinned]) .tab-close-button {
  visibility: collapse !important;
  opacity: 0 !important;
  transition: all 250ms ease-in-out !important;
}
#tabbrowser-tabs .tabbrowser-tab:not([pinned]):hover .tab-close-button {
  visibility: visible !important;
  opacity: 1 !important;
  transition: all 250ms ease-in-out !important;;
}
#tabbrowser-tabs .tabbrowser-tab:not([pinned]) .tab-close-button {
  /* only use one of these */
  display: -moz-box !important; /*xx-112*/
  display: inline-flex !important; /*113+*/
}

/* TAB: close button colors on hover */
.tab-close-button:hover {
  background-color: rgba(255,0,0,.7) !important;
  fill: white !important;
}

Przeczytaj tę odpowiedź w całym kontekście 👍 2

Wszystkie odpowiedzi (2)

more options

People are still welcome to try and get help with userChrome.css edits here as there are some people familiar with such here.

more options

Wybrane rozwiązanie

Try to keep the code simple and do not try to add all nodes (you missed #tabbrowser-arrowscrollbox).

/* Show Tab Close buttons only when hovered */
#tabbrowser-tabs .tabbrowser-tab:not([pinned]) .tab-close-button {
  visibility: collapse !important;
  opacity: 0 !important;
  transition: all 250ms ease-in-out !important;
}
#tabbrowser-tabs .tabbrowser-tab:not([pinned]):hover .tab-close-button {
  visibility: visible !important;
  opacity: 1 !important;
  transition: all 250ms ease-in-out !important;;
}
#tabbrowser-tabs .tabbrowser-tab:not([pinned]) .tab-close-button {
  /* only use one of these */
  display: -moz-box !important; /*xx-112*/
  display: inline-flex !important; /*113+*/
}

/* TAB: close button colors on hover */
.tab-close-button:hover {
  background-color: rgba(255,0,0,.7) !important;
  fill: white !important;
}

Zmodyfikowany przez cor-el w dniu