Image of a PageAction is hidden unless an image attribute is present

NEW
Unassigned

Status

Firefox for Android Graveyard
General
8 years ago
8 years ago

People

(Reporter: Wladimir Palant, Unassigned)

Tracking

Details

(Reporter)

Description

8 years ago
I am adding a pageaction tag via overlay and styling it in CSS. As it is now, specifying list-image-style isn't sufficient to add an image, I had to add an empty image attribute to the pageaction tag as well. Reason are these styles:

pageaction .pageaction-image {
  width: 32px;
  height: 32px;
  -moz-margin-end: 8px;
}

pageaction:not([image]) .pageaction-image {
  width: 0;
}

Maybe instead of hardcoding the image size max-width/max-height could be specified? This should do fine in all the cases and would also have the nice side-effect of not upscaling my image (which is 24x24). I didn't test this however.
We had a place for images in PageActions, but decided that we didn't want to enable them for this release. There is still some discussion going on as to whether we should use images in page actions or not.

Madhava?
(Reporter)

Comment 2

8 years ago
Given that this particular page action serves the dual purpose of showing Adblock Plus status and allowing to disable Adblock Plus on a site, not having an image isn't really an option. Nobody will want to read text every time they want to check on Adblock Plus status. I now "fixed" this issue by overriding the image size in Adblock Plus (https://hg.adblockplus.org/adblockplus/rev/019e34888793 - keeping the height at 32px was required since the layout would be broken otherwise).
In theory, I like the idea of icons for site menu (and context menu) items.  We left them out here mostly because they fit less well in maemo style than they do on android (where such things are common) and to save some design time.  I wouldn't rule them out.
You need to log in before you can comment on or make changes to this bug.