1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed [1.4.1] !important is removed from style property

Discussion in 'Resolved Bug Reports' started by Arty, Sep 18, 2014.

  1. Arty

    Arty Well-Known Member

    When adding !important at the end of some style properties, it disappears from CSS.

    Example: saving this property via WebDav:
    Code:
    .categoryStrip .categoryToggle
    {
       @property "categoryToggle";
       text-decoration: none !important;
       @property "/categoryToggle";
    }
    
    
    In CSS output it changes to
    Code:
    .categoryStrip .categoryToggle
    {
    text-decoration: none;
    
    }
    
    !important magically disappears.
     
  2. Mike

    Mike XenForo Developer Staff Member

    This is really as expected. Style properties are not generally arbitrary CSS so they have certain rules they're expected to follow. Allowing !important is generally not one of them. (Arguably we could look to move it to the additional CSS part though.)
     
  3. Arty

    Arty Well-Known Member

    It works for some other properties like background-image.

    If its a design issue to make UI easier to use then it should be moved to extra properties block. Style authors should not be unable to use parts of CSS because of UI design.
     
  4. Mike

    Mike XenForo Developer Staff Member

    It will now be moved to extra or outside if extra isn't available.
     
  5. Arty

    Arty Well-Known Member

    Thanks!
     

Share This Page