Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Rake assets:precompile aborts after CSS3 animation

Rake assets:precompile aborts after CSS3 animation

Problem

Two questions: 1) How can I get Rake assets:precompile to work with the CSS3 animations I have in my application.css?

In application.css:

@-webkit-keyframes greenPulse {
from { background-color: #749a02; -webkit-box-shadow:: 0 0 9px #333; }
50% { background-color: #91bd09; -webkit-box-shadow:: 0 0 18px #91bd09; }
to { background-color: #749a02; -webkit-box-shadow:: 0 0 9px #333; }
}

The error:

rake aborted!
Invalid CSS after "...kit-box-shadow:": expected expression (e.g. 1px, bold), was ": 0 0 9px #333; }"

EDIT This is fixed by changing :: to :. I still need help with this question though:

2) How can I avoid having to do rake assets:precompile every time I want to update my CSS page in development only?

Problem courtesy of: varatis

Solution

The reason you need to recompile assets in development mode is that Rails will load your precompiled assets before your changed stuff under app/assets.

Generally, you shouldn't need to precompile in development mode at all: just make sure your public/assets folder is empty. You can use rake assets:clean to get rid of them. Then your development changes should be picked up immediately.

Solution courtesy of: Dylan Markow

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

Rake assets:precompile aborts after CSS3 animation

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×