Closed Bug 1198504 Opened 9 years ago Closed 9 years ago

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

Categories

(Firefox :: Toolbars and Customization, defect)

All
Windows
defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox43 --- affected

People

(Reporter: mkaply, Unassigned)

Details

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.
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)
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
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)
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
Closed: 9 years ago
Flags: needinfo?(mozilla)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.