Search code examples
cssfirefox-addonmedia-queries

Styling option_ui and browser_action page for Firefox Mobile


I developed an extension for Firefox with an option popup for preferences.

On mobile, as it doesn't open as a popup but as a new tab moz-extension://(...)/popup.html, I had to apply some specific CSS media queries.

But as you can see below, it's definitely not working.

What should I do ?

CSS page is here https://github.com/ANN-MB/LEIA/blob/master/extension%20firefox/leia.css

enter image description here


Solution

  • I solved the problem.

    It wasn't about media queries but because my manifest.json looked like this :

    "options_ui": {
        "page": "config.html",
        "browser_style": false,
        "open_in_tab": true
      }
    

    It seems that when open_in_tab is set to true, the Firefox Mobile Browser opens the option page with the desktop display (don't ask me why).

    So turning "open_in_tab" to false gave me the good render.