darkphantum
darkphantum

Reputation: 531

Rails 3.2.1 asset precompile error when using !important in .css

when I do a rake assets:precompile on my rails app it fails if I have the config

config.assets.compress = true  

The block that is causing the error is

.banner-row {
overflow: hidden;
margin: 0px; !important
padding: 0px; !important    
}

The error I get is

rake aborted!
Sass::SyntaxError: Invalid CSS after "margine: 0px; ":expected "}", was !important"

The precompile task passes with compress = false

Upvotes: 0

Views: 256

Answers (1)

Triveni Badgujar
Triveni Badgujar

Reputation: 941

Try this:

.banner-row {
overflow: hidden;
margin: 0px !important; 
padding: 0px !important;
}

Upvotes: 2

Related Questions