Closed Bug 1780970 Opened 3 years ago Closed 3 years ago

userChrome.css does not work in new addressbook (TB 102)

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 102
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: drfreund, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

I created the following rule in userChrome.css
(only as an experiment, actually I want to apply some other styles to the addressbook, but this one should work anyway):

html body.layout-table div#booksPane,
html body.layout-table div#booksPane *
{
background-color: #FF0000 !important;
}

Selectors were taken from DevTools Inspector (copied CSS-path with context menu).

toolkit.legacyUserProfileCustomizations.stylesheets is set to "true" and rules for other UI-elements work well.

My system:

  • Windows 11 x64 with all Updates
  • Thunderbird x64 Version 102.0.3, POP3 account

Actual results:

After restart of Thunderbird, the addressbook menu is still diplayed in standard colors. Also other rules for addressbook elements in userChrome.css do not take effect. It seems, that userChrome.css is not loaded at all for the addressbook, because DevTools Inspector does not show any rule defined in userChrome.css.

Expected results:

The addressbook menu should have been displayed with red background. Also other CSS-rules in userChrome.css should take effect in the addressbook.
This issue occurred first in Thunderbird 102, which introduced a new addressbook. In older versions, userChrome.css worked well also for the addressbook.

Did you try userContent.css?

userContent.css does really work. Many thanks!
But is that the right place? The documentation on http://kb.mozillazine.org/index.php?title=UserContent.css says:
"userContent.css in the chrome folder is a CSS file that you can use to change the way web sites and e-mails look".
The addressbook is neither a web site nor an e-mail. It's clearly a part of Thunderbird's UI and it should as usual be possible to style it with userChrome.css. I never heard that someone used userContent.css for this purpose.

The new address-book is now in-content, so that's why userContent.css applies instead.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID

The new address-book is now in-content, so that's why userContent.css applies instead.

For me personally, everything is ok now, because I can do, what I want to do. But I doubt, that other users will understand such fine philosophical differences, which determine, if userContent.css or userChrome.css applies. The new addressbook looks like an integrated part of the UI, so my first thought was "style it with userChrome.css as usual" (as it was with the old addressbook). That's the first case, I have to use userContent.css instead, and if I hadn't created this bug entry, I would never have come to the solution for myself. If you google for "Thunderbird 102", "addressbook" and "css", you won't find any hint to the userContent.css (which I only knew from Firefox so far). Please consider a better communication and describe it in a documentation, that can be found.

You need to log in before you can comment on or make changes to this bug.