Closed Bug 991042 Opened 10 years ago Closed 6 years ago

re-define CSS var buttonStateHover

Categories

(Firefox :: Toolbars and Customization, defect)

29 Branch
x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: quicksaver, Unassigned)

References

Details

(Whiteboard: [Australis:P-])

Just a small request. Is there any way that http://mxr.mozilla.org/mozilla-central/source/browser/themes/shared/customizableui/panelUIOverlay.inc.css#16 could be changed from
> %define buttonStateHover :not(:-moz-any([disabled],[open],:active)):hover
to
> %define buttonStateHover :not(:-moz-any([disabled],[open],:active)):-moz-any(:hover,[hover])
?

In short, I've enabled keyboard navigation in panelviews in my add-on (well, only in my specific panelview, for now at least). But obviously that will never affect their :hover state directly, I could only emulate it by adding a [hover] attribute and then defining a custom CSS stylesheet that is essentially a copy of what is used for this state in the firefox sheets, so that the user can actually see what is being selected.

I realize that right now that really is just two lines of CSS code to copy into my stylesheets, so it's not hard to do at all, and that adding a :-moz-any as the last selector is not optimal (although I'm not sure that counts in this case). But adding this kind of selector would go a long way into making sure the add-on stays compatible with all future style changes, so I thought I'd ask. :)
If we do this we should just use the :focus pseudoclass, right?
Whiteboard: [Australis:P-]
Well... yeah. I hadn't thought of that, I just tried it and :focus works fine. I still have to set "-moz-user-focus: normal;" on the panel's toolbarbuttons, otherwise calling .focus() on them won't do anything, but I'm fine with that of course.
We've enabled keyboard navigation for some of these panels now, so I think this is effectively wfm.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.