cannot disable close tab animations easily due to new !important

UNCONFIRMED
Unassigned

Status

()

defect
UNCONFIRMED
4 years ago
4 years ago

People

(Reporter: simonzack, Unassigned)

Tracking

40 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150812163655

Steps to reproduce:

The close tab animation introduced by #465086 has added important for some reason:

    tab.style.setProperty("max-width", tabWidth, "important");

This stops me from being able to revert to the animation free behavior using a userstyle.

To resolve this I would probably need to write an addon something along the lines of hooking _lockTabSizing to kill the style change, which isn't really convenient (I'm not very experienced with addon dev). But this really should be a styling issue.

Can the important be gotten rid of here?
(Reporter)

Updated

4 years ago
OS: Unspecified → All
Hardware: Unspecified → All

Comment 1

4 years ago
(In reply to simonzack from comment #0)
> This stops me from being able to revert to the animation free behavior using
> a userstyle.

What's your user style? Is it not possible to make yours more specific?
Blocks: 465086
Component: Untriaged → Tabbed Browser
(Reporter)

Comment 2

4 years ago
This is the entire user style which gets rid of tab animations. The relevant part is the max-width settings. It used to work a few released back, before the introduction of the !important inline style.

  @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

    .tabbrowser-tab:not([pinned]) {
      max-width: 250px !important;
      min-width: 100px !important;
    }
      
    .tabbrowser-tab:not([fadein]) {
      max-width: 1px !important;
      min-width: 1px !important;
      max-width: 1px;
      min-width: 1px;
    }

    .tabbrowser-tab:not([pinned]) {
      transition: none !important;
    }

    .tabbrowser-tabs[movingtab] > .tabbrowser-tab[fadein]:not([selected]) {
      transition: none !important;
    }
    
    .closing-tabs-spacer {
      width: 0 !important;
    }
You need to log in before you can comment on or make changes to this bug.