sstephenson/sprockets — Issue #241: Sprockets doesn't allow a CSS class to be in application.css and for rake assets:precompile to run
Author: poptart
Created: 2011-11-09 01:35:58+00:00
State: open

When adding a CSS class declaration to application.css, ```rake assets:precompile``` fails but the will render when viewed at via a GET request

I am having a great deal (hour and a half) of difficulty in understanding/piecing together/working backwards with the Sprockets internals, but a ```git bisect``` has narrowed ```rake assets:precompile``` down to this issue with CSS classes

When faced with the following CSS

~~~css
.form-glow {
border: 1px solid #DDD;
padding: 10px;
margin: 5px;
-moz-box-shadow: 0 0 5px #888;
-webkit-box-shadow: 0 0 5px #888;
box-shadow: 0 0 5px #888;
}
~~~

At the end of application.css, ```rake assets:precompile``` fails with the following:

~~~
luke@holly [01:26:48] [~/c/rails/bandaid]
-> % rake assets:precompile
/usr/local/bin/ruby /usr/local/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Invalid CSS after " border:": expected pseudoclass or pseudoelement, was " 1px solid #DDD;"
(in /home/luke/c/rails/bandaid/app/assets/stylesheets/application.css)

Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby /usr/local/bin/rake as...]

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
~~~

I can ship you the entire application if you want, provided you don't give me any feedback on any code as it's coursework

Thx,
Luke