Make common.css loadable from preferences pages in MailExtensions
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(Not tracked)
People
(Reporter: qeole, Unassigned)
References
Details
Thunderbird's add-on manager offer “preferences” pages for MailExtensions. The content of those pages is generated by the add-ons themselves, and this includes the CSS for styling the pages.
It would be nice to be able to reuse the CSS rules used elsewhere in Thunderbird for this page, in particular the ones from file common.css
. This would bring:
- Better consistency with the surrounding interface.
- Color consistency for dark themes, allowing the background color to be set with
background-color: var(--in-content-box-background);
.
This is nearly possible already by including the file from the HTML for the preferences page, with <link rel="stylesheet" type="text/css" href="chrome://global/skin/in-content/common.css"/>
. But then the CSS fails to load, apparently because the :root
CSS selector is not interpreted correctly in that page.
One workaround is to replace :root
with body
(example here), but this currently means that the updated CSS file has to be copied and embedded into the add-on.
Would it be possible to make common.js
loadable from the preferences pages?
Maybe related: https://bugzilla.mozilla.org/show_bug.cgi?id=1418600, although this seems to be targetted at Firefox, and if I understand correctly the objective is to allow add-ons to update the CSS instead of reading it.
Updated•3 years ago
|
This CSS has now moved to toolkit/themes/shared/in-content/common-shared.css
.
Description
•