• 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

Arty

Well-known member
#1
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.
 

Mike

XenForo developer
Staff member
#2
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.)
 

Arty

Well-known member
#3
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.