Closed Bug 1714571 Opened 3 years ago Closed 1 year ago

sidebar_action.browser_style does not set background

Categories

(WebExtensions :: Untriaged, enhancement, P5)

Firefox 89
enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

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.

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.

Component: Untriaged → Theme

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.

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Component: Theme → CSS Parsing and Computation
Ever confirmed: true
Product: Firefox → Core

Not sure if this is the right component?

Component: CSS Parsing and Computation → Extension Compatibility
Flags: needinfo?(mixedpuppy)
Product: Core → Firefox

browser_style will never fully provide a "browser style" for addons. moving for our next triage.

Component: Extension Compatibility → Untriaged
Flags: needinfo?(mixedpuppy)
Product: Firefox → WebExtensions
Severity: -- → N/A
Priority: -- → P5

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.

Closing bug because support for browser_style feature is going to be removed (at least in MV3), see bug 1827910.

Blocks: 1458678
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX

(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).

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