Customizing the Font in Firefox Reader Mode
(this is a repost from a previous iteration of this blog)
I was surprised that there was no easily found way to customize the font inside Reader mode in Firefox. None in the about:config, anyway. However, you CAN do it in the userContent.css file, which might not exist on your system. Yet. But we can change that.
Here’s how to find or create the userContent.css file for Firefox:
-
Locate your Firefox profile folder:
- Open Firefox, type
about:supportin the address bar, and press Enter. - In the “Application Basics” section, find the “Profile Folder” entry and click on the “Open Folder” button next to it.
- Open Firefox, type
-
Create the
chromefolder (if it doesn’t exist):- Inside the profile folder, check if there’s a' chrome' folder. If it already exists, you can proceed to the next step. If not, create a new folder and name it
chrome.
- Inside the profile folder, check if there’s a' chrome' folder. If it already exists, you can proceed to the next step. If not, create a new folder and name it
-
Create the
userContent.cssfile:- Inside the
chromefolder, create a new text file and name ituserContent.css.
- Inside the
-
Edit the
userContent.cssfile:- Open the
userContent.cssfile using a text editor (e.g., Notepad, Notepad++, Visual Studio Code). - Add your custom CSS styles to modify the appearance of web pages. For example, to change the font of web page text, you can use CSS rules like:
- Open the
.moz-reader-content {
font-family: Hack, monospace !important;
}
-
Save the
userContent.cssfile:- Save the changes you made to the
userContent.cssfile.
- Save the changes you made to the
-
Restart Firefox:
- After saving the changes, restart Firefox to apply the custom styles specified in
userContent.css.
- After saving the changes, restart Firefox to apply the custom styles specified in
Remember that the userContent.css file only affects the appearance of web pages, not Firefox’s built-in user interface. If you style a body tag, you’ll change every font on every page you visit. However, the .moz-reader-content class should only apply to Reader mode. In theory. I’ll go test now. :)