Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-7440 in 4.2.0.663.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Location
    San Francisco, CA
    Posts
    103
    Vote Rating
    5
    alicexyl is on a distinguished road

      2  

    Default Abuse of !important in theme styles

    Abuse of !important in theme styles


    REQUIRED INFORMATIONExt version tested:
    • Ext 4.1.0
    Browser versions tested against:
    • Chrome
    • IE8/9
    DOCTYPE tested against:
    • irrelevant
    Description:
    • In styling framework code, !important flags used in places that don't seem necessary. e.g. See it used in grid icon styles:
      Code:
          //grid icons
          .#{$prefix}tbar-page-first {
              background-image: theme-background-image($theme-name, 'grid/page-first.gif') !important;
          }
      
      
          .#{$prefix}tbar-loading {
              background-image: theme-background-image($theme-name, 'grid/refresh.gif') !important;
          }
      toolbar bg styles:
      Code:
          @if not $supports-gradients or $compile-all {
              @if $background-gradient != null {
                  .#{$prefix}nlg {
                      .#{$prefix}toolbar-#{$ui} {
                          background-image: theme-background-image($theme-name, 'toolbar/toolbar-#{$ui}-bg.gif') !important;
                          background-repeat: repeat-x;
                      }
                  }
              }
          }
    • This makes it harder for us to write rules to override those bg with our own, since we have to put !important to beat the specificity. Also it's impossible to use Compass spriting mixins to override those icons.
    Possible fix:
    • Remove !important flags in framework code to make code more extensible and reduce specificity wars.
    Operating System:
    • Win 7

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,067
    Vote Rating
    659
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    I doubt we'll be able to remove them all, but it's something worth looking into.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha - Ext JS Dev Team Phil Guerrant's Avatar
    Join Date
    May 2011
    Location
    Colorado
    Posts
    323
    Vote Rating
    87
    Phil Guerrant is just really nice Phil Guerrant is just really nice Phil Guerrant is just really nice Phil Guerrant is just really nice Phil Guerrant is just really nice

      0  

    Default


    As of 4.2.0 we've removed most all of the unnecessary !important rules. There are a few exceptions that remain, but most all of them have a good reason to be there. Marking this one as fixed.
    Phil Guerrant
    Ext JS - Development Team

Thread Participants: 2

Tags for this Thread