Az oldal korlátolt funkcionalitással fog rendelkezni, amíg elvégezzük a felhasználói élményt javító karbantartást. Ha egy leírás nem oldja meg a problémáját, és kérdést tenne fel, akkor a támogatási közösségünk a @FirefoxSupport Twitter oldalon tud segíteni, vagy az /r/firefox oldalon a Redditen.

Támogatás keresése

Kerülje el a támogatási csalásokat. Sosem kérjük arra, hogy hívjon fel egy telefonszámot vagy osszon meg személyes információkat. Jelentse a gyanús tevékenységeket a „Visszaélés bejelentése” lehetőséggel.

További tudnivalók

A témacsoportot lezárták és archiválták. Tegyen fel új kérdést, ha segítségre van szüksége.

I'm looking to customize a light theme but can't find the CSS file to alter the hex codes

  • 3 válasz
  • 2 embernek van ilyen problémája
  • 3 megtekintés
  • Utolsó üzenet ettől: jawsont

more options

I've looked pretty exhaustively and it seems like since Quantum, the light themes all seem to go back to about:config. Specifically I've been in the profiles folder and tried changing the hex in prefs.js with no luck since you can only alter the text and highlight colours (and even those don't seem to change when I put in a different hex value and relaunch FF).

Specifically what I'm trying to do is make the "highlight/find" background color for an error have higher contrast. It must be editable on some level without having to resort to doing the whole userChrome.css thing because the lightweight themes like defaulDark have a different color than this.

I've looked pretty exhaustively and it seems like since Quantum, the light themes all seem to go back to about:config. Specifically I've been in the profiles folder and tried changing the hex in prefs.js with no luck since you can only alter the text and highlight colours (and even those don't seem to change when I put in a different hex value and relaunch FF). Specifically what I'm trying to do is make the "highlight/find" background color for an error have higher contrast. It must be editable on some level without having to resort to doing the whole userChrome.css thing because the lightweight themes like defaulDark have a different color than this.

Kiválasztott megoldás

The built-in themes have access to more parts of Firefox than the themes from the Add-ons site.

To replace or override the Find bar colors, you will need to create custom style rules in a userChrome.css file. For example, this sets white text on a dark red background:

/* White-on-Dark-Red for Not Found */
.findbar-textbox[status="notfound"] {
  color: #fff !important;
  background-color: #900 !important;
}

If you haven't encountered the userChrome.css file before, I have a site here with mountains of detail: https://www.userchrome.org/how-create-userchrome-css.html

Válasz olvasása eredeti szövegkörnyezetben 👍 1

Összes válasz (3)

more options

Attached is the highlight box in question. On the left is the 'light theme' on the right is the 'dark theme'. Definitely a different background colour so it must be editable in light themes right?

Módosította: jawsont,

more options

Kiválasztott megoldás

The built-in themes have access to more parts of Firefox than the themes from the Add-ons site.

To replace or override the Find bar colors, you will need to create custom style rules in a userChrome.css file. For example, this sets white text on a dark red background:

/* White-on-Dark-Red for Not Found */
.findbar-textbox[status="notfound"] {
  color: #fff !important;
  background-color: #900 !important;
}

If you haven't encountered the userChrome.css file before, I have a site here with mountains of detail: https://www.userchrome.org/how-create-userchrome-css.html

more options

I was leery of using userChrome.css given the warning at the top of the modifications page (https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tutorial/Modifying_the_Default_Skin). It makes it sound like at some point FF will no longer support the userChrome file.

Nonetheless - much appreciated - putting that element into the css file worked magic. Also, thank you - I actually HAD been to your page before while I was looking for solutions, it's a great help. Part of my problem had been not knowing that .findbar-textbox was the element I needed to put in.

Cheers


<solved>