sidebar_action.browser_style does not set background
Categories
(WebExtensions :: Untriaged, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: tom, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0
Steps to reproduce:
When setting sidebar_action.browser_style to true
"sidebar_action": {
....
"browser_style": true
},
Actual results:
The background of the sidebar remains white unless otherwise specified in the panel's internal CSS.
I believe that the issue is that in chrome://browser/content/extension.css
the background-color
property is set to transparent
. Does a sidebar support a transparent background like this? This would be the ideal solution as it could then display the theme's background image/colour very easily.
Expected results:
transparent
should be correctly applied to the sidebar background.
Not knowing about firefox internals, but enough about HTML/CSS, I would suggest that the frame which displays the sidebar should have the equivalent of <iframe allowtransparency="true">
applied to it when browser_style
is set to true.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Theme' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Thank you for taking the time log this issue, im not sure if its a defect or maybe more of an enhancement but I will change the component for this issue and maybe one of our developers can take a look and they might know more about it, if this worked in the past and its an actual defect we can change this back but for now I will set it as an enhancement.
Comment 3•3 years ago
|
||
Not sure if this is the right component?
Comment 4•3 years ago
|
||
browser_style will never fully provide a "browser style" for addons. moving for our next triage.
Updated•3 years ago
|
Reporter | ||
Comment 5•2 years ago
|
||
is there no way to set a default CSS which sets the font, background, hover and foreground colours from the selected theme? I realise there's not 1:1 mapping for everything but just inheriting those things would be a better default than the black text on a white background used for web pages.
Comment 6•1 year ago
|
||
Closing bug because support for browser_style feature is going to be removed (at least in MV3), see bug 1827910.
Comment 7•1 year ago
|
||
(In reply to Tom Butler from comment #5)
is there no way to set a default CSS which sets the font, background, hover and foreground colours from the selected theme? I realise there's not 1:1 mapping for everything but just inheriting those things would be a better default than the black text on a white background used for web pages.
As noted in bug 1827910, dark/light theme support can easily be added by relying on the standard web platform feature: <meta name="color-scheme" content="light dark">
. Example: https://github.com/Rob--W/dont-track-me-google/commit/93015a2938ab621b5a8c312ab66a77fa4231615b
For anything more complex, you could try to use the theme.getCurrent
API to retrieve relevant properties (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/theme/getCurrent).
Description
•