Unable to override -moz-padding-end with CSS important

RESOLVED INVALID

Status

()

Firefox
Toolbars and Customization
RESOLVED INVALID
3 years ago
3 years ago

People

(Reporter: mkaply, Unassigned)

Tracking

Trunk
All
Windows
Points:
---

Firefox Tracking Flags

(firefox43 affected)

Details

(Reporter)

Description

3 years ago
I am trying to remove a dropmarker from a menu button on Windows, but I ran into this code:

http://mxr.mozilla.org/mozilla-central/source/browser/themes/windows/browser.css#809

I tried to remove it with this CSS:

#nav-bar #my-button.toolbarbutton-1[type=menu] > .toolbarbutton-text {
  -moz-padding-end: 0px !important;
}

And while the cascade in the DOM Inspector shows that my CSS should win, the 17px padding remained.

If I explicitly delete the rule in the DOM Inspector, it fixes the problem.

Comment 1

3 years ago
How would the margin on the toolbarbutton-text influence whether or not the dropmarker is being shown?

If you delete the rule, you also delete its application to all the other selections in that rule (scroll up from your link).

Also, can you fix the summary?
Flags: needinfo?(mozilla)
(Reporter)

Comment 2

3 years ago
Sorry about the summary. Not sure what happened there.

I'm using:

#my-button dropmarker {
  display: none;
}

because I don't want the dropmarker.

The problem is that even when you remove the dropmarker, you're left with that 17px of space on the end.

I'll see if the 17px is coming from somewhere else, but based on the DOM Inspector, since my rule is last (and marked important), shouldn't it be applied?
Flags: needinfo?(mozilla)
Summary: Unabke → Unable to override -moz-padding-end with CSS important

Comment 3

3 years ago
My point is, a lot of things get that 17px:

805 #nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-icon,
806 #nav-bar .toolbarbutton-1[type=panel] > .toolbarbutton-badge-stack,
807 #nav-bar .toolbarbutton-1[type=menu]:not(#PanelUI-menu-button):not(#back-button):not(#forward-button) > .toolbarbutton-icon,
808 #nav-bar .toolbarbutton-1[type=menu]:not(#PanelUI-menu-button) > .toolbarbutton-badge-stack,
809 #nav-bar .toolbarbutton-1[type=menu] > .toolbarbutton-text /* hack for add-ons that forcefully display the label */ {


Are you sure the margin you're seeing doesn't belong to the icon or badge-stack?
Flags: needinfo?(mozilla)
(Reporter)

Comment 4

3 years ago
I should have looked at that more. You're right. It's the icon that is affecting things.

I wasn't thinking about how deleting the rule would affect everything.

Sorry to waste your time.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Flags: needinfo?(mozilla)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.