搜尋 Mozilla 技術支援網站

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

了解更多

How do I change 'line-height' in Mozilla UI

  • 8 回覆
  • 4 有這個問題
  • 2 次檢視
  • 最近回覆由 cor-el

more options

I am using "OpenDyslexicAlta" at 16 px as my font. I have forced Firefox 52.4.0 64 bit and Thunderbird 52.3.0 also 64 bit to use this font regardless of which font is called for by the designers of the pages. (I am dyslexic and it improves my ability to READ)

This laptop has Debian Stretch as the OS.

I would like to know how to change the 'line-height' to 1.2em in both Firefox and Thunderbird UI

I am using "OpenDyslexicAlta" at 16 px as my font. I have forced Firefox 52.4.0 64 bit and Thunderbird 52.3.0 also 64 bit to use this font regardless of which font is called for by the designers of the pages. (I am dyslexic and it improves my ability to READ) This laptop has Debian Stretch as the OS. I would like to know how to change the 'line-height' to 1.2em in both Firefox and Thunderbird UI

被選擇的解決方法

The path to the profile folder is correct, but you need to create a chrome folder in these locations and place userContent.css and userChrome.css in this chrome folder.

從原來的回覆中察看解決方案 👍 2

所有回覆 (8)

more options

Sorry, here are the images showing the problem I am attempting to correct. Please note in the firefox browser image the 'highlighted' text is far to large. Also in the thunderbird images the lines blot out other lines it makes reading next to impossible.

more options

In Firefox, where you have an issue with web content, I suggest:

  • do not set a "Minimum font size" larger than 9px since this setting will enlarge the font without adjusting the line height proportionately
  • try to use zoom to address unusually small fonts

If it's still necessary to modify line-height globally for all web content, it might be possible using a custom style rule (for example, using the Stylus extension), but it may require a lot of adjustments for individual design patterns.

In Thunderbird, it seems the problem is with the layout of the user interface and not the message content. Not sure what to suggest there. It may be better to have a separate question on the Thunderbird board. https://support.mozilla.org/questions/new/thunderbird

more options

You can try to disable hardware acceleration in Firefox.

You need to close and restart Firefox after toggling this setting.

You can check if there is an update for your graphics display driver and check for hardware acceleration related issues.

more options

Thanks for this help; I changed the "Minimum Font Size" as you suggested to no avail. I then changed all font sizes to 9px. I have provided two images showing 1) font size; 2) Firefox highlight overwriting lines above.

I changed the font-family and everything works perfectly. ... what I would like to do it increase 'line-height' to 2em or add padding on top of each line is this at all possible?

more options

I tried these suggestions, I even tried removing Firefox and installed the newest version as well. My video drivers are up to date as well.

I would like to change the line-height in the browser or add padding to the top of line of text. For the life of me I cannot understand why Mozilla makes this so difficult. ;-)

more options

A general font size of 9px is awfully small. The default font size is 16px and I suggest keeping that.

As mentioned, you can apply custom style rules to web pages using the Stylus extension. You also can create a file named userContent.css, but that's a little more of a pain. Here are some sample rules to try to universally change line-height to 2em:

* {
  line-height: 2em !important;
}
html, body, div, section, article, p, span, th, td {
  line-height: 2em !important;
}

Some pages may override this with highly specific selectors that also have an !important rule. In those cases, you may need to add a new rule. But hopefully this will cover most cases.

more options

jscher2000 Sorry I did not reply about Stylus, I added it to my firefox but when I attempted to use it I received this "Stylus cannot function in private windows because Firefox disallows direct connection to the internal background page context of the extension."

If I create the userContent.css file you suggest would the path be

Firefox ~/.mozilla/firefox/95qizdjj.default

Thunderbird ~/.thunderbird/qyn3p6v3.default

I would create the file for each?

more options

選擇的解決方法

The path to the profile folder is correct, but you need to create a chrome folder in these locations and place userContent.css and userChrome.css in this chrome folder.