搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How to change font-weight value of DOMi's font

  • 1 回覆
  • 1 有這個問題
  • 3 次檢視
  • 最近回覆由 cor-el

more options

Font-weight value of DOMi's font for my 17 is too mach. Font-weight value of DOM tree is fine instead. So, can i to decrease font-weight value for DOMi' and Style Editor.

Font-weight value of DOMi's font for my 17'' is too mach. Font-weight value of DOM tree is fine instead. So, can i to decrease font-weight value for DOMi' and Style Editor.

所有回覆 (1)

more options

Can you clarify with a screenshot what items you want to change and with what style rules?

  • font-family: monospace;
  • font-size: 11pt !important;
  • font-weight: bold;

For CodeMirror you can use an @import rule in the userChrome.css file to import a file with rules for CodeMirror as it needs a different namespace.

I use this in a codemirror.css file:

@namespace url("http://www.w3.org/1999/xhtml");

/* Developer Tools - CodeMirror */
.devtools-monospace .CodeMirror * {font-size:10pt!important; font-weight:bold}
.devtools-monospace .CodeMirror pre {white-space:pre-wrap!important; word-wrap:break-word!important}

userChrome.css:

@import url("codemirror.css");

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

<other CSS stuff for userChrome.css>

The customization files userChrome.css (user interface) and userContent.css (websites) are located in the chrome folder in the Firefox profile folder.

  • Create the chrome folder (lowercase) in the <xxxxxxxx>.default profile folder if this folder doesn't exist
  • Use a plain text editor like Notepad to create a (new) userChrome.css file in the chrome folder (file name is case sensitive)
  • Paste the code in the userChrome.css file in the editor window
  • Make sure that the userChrome.css file starts with the default @namespace line
  • Make sure that you select "All files" and not "Text files" when you save the file via "Save file as" in the text editor as userChrome.css.
    Otherwise Windows may add a hidden .txt file extension and you end up with a not working userChrome.css.txt file