compass-sass

Adding !important using a Compass Mixin


If I'm using compass for CSS and use a function or mixin like:

   @include background-image(linear-gradient(#a3cce0, #fff)); 

is there any easy way to have compass add !important to every line it generates?


Solution

  • UPDATE: new versions of sass support this syntax now:

    @include border-radius(5px !important);
    

    Just do this (as noted in @naoufal answer).

    --- old answer ---

    You can not use !important with compass mixings, but the culprit is not compass, you should blame sass for this.

    @include border-radius(5px) !important; #=> SASS Syntax Error