2

My rails (with bootstrap-sass gem) application.css.scss looks like this:

/*
 * ...boilerplate application.css.scss comments
 *= require_tree .                                                              
 *= require_self                                                                
 */                                                                             
@import 'bootstrap'

.container-fixed {                                                              
  margin: 0 auto;                                                               
  max-width: 970px;                                                             
}           

Viewing any page gives me a Sass:SyntaxError like this Invalid CSS after "...ort 'bootstrap'": expected selector or at-rule, was ".container-fixed {". I don't see a problem with the .container-fixed snippet. Elsewhere I see that this error can be caused by a file imported before the line that Sass complains about. However, there is no other CSS in this project (apart from bootstrap itself). What am I doing wrong?

6
  • 4
    You're missing a semicolon after your import. Commented Feb 20, 2014 at 14:04
  • Also, rename your application.css to application.css.scss if you haven't. Commented Feb 20, 2014 at 14:06
  • You mean the import line should read @import 'bootstrap'; ? Commented Feb 20, 2014 at 14:06
  • @Vageesh my typo, it is named application.css.scss Commented Feb 20, 2014 at 14:08
  • Doh! the docs are quite clear. My mistake Commented Feb 20, 2014 at 14:18

1 Answer 1

6

As per Cimmanon's comment, the issue is fixed by adding a semi-colon at the end of the @import line, as shown in the bootstrap-sass docs.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.