this post was submitted on 14 Dec 2025
11 points (100.0% liked)
Thunderbird
1093 readers
1 users here now
Thunderbird is the leading free and open-source email, calendaring, newsfeed, and chat client with more than 20 million active monthly users across Windows, macOS, and Linux. One of Thunderbird's core principles is the use and promotion of open and decentralized standards.
This is an unofficial forum for Mozilla Thunderbird and feel free to join and discuss
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
After some trial and error, I found that adding the following to userContent.css seems to work:
Thunderbird's source code also has some function that reads preferences editor.use_custom_colors and editor.background_color and sets the default color based on those, but it seems that the function is never called. Code rot I guess.
Thank you so much, this worked. Two points though:
Thanks for the correction. I must've overlooked something when looking at how the preferences are loaded. :)
At first, I looked into Thunderbird's source code and tried to simply identify the element that I could use in userChrome.css. I found that the element is called
#messageEditorin messengercompose.xhtml. However, this doesn't work because the editor textboxes are apparently iframe-like things that load another website inside them (probably to prevent copypaste injection attacks or something). Even if I added* {background-color: red}in userChrome.css, it couldn't match the textbox.I figured out the userContent.css way when I opened the debugger in Thunderbird's developer tools and set a breakpoint in the script that manages the textbox. For example, here's how to find it for the new calendar event editor:
So the calendar editor lives inside about:blank. However, about:blank is used in lots of places, so it would be good to add some extra conditions instead of changing the background of all about:blank pages used throughout Thunderbird. Luckily, the above picture shows that there's a link element that can be used as an extra condition like this:
The tricky part is finding the right code to put a breakpoint into. It helps if you have a local copy of the comm-central source code files (as instructed in Thunderbird docs), since it includes XHTML files for digging around. The new calendar event window is in the somewhat logical path calendar/base/content/item-editing/calendar-item-iframe.xhtml, and the related scripts are right next to it in calendar-item-iframe.js.
Thank you so much for taking the time to teach me how to fish. I admit I was not seeing myself crawling through the source to find out how to alter those settings.