ddonche
ddonche

Reputation: 1065

Difference between application.css.scss and application.scss

I've always just renamed by application.css file to application.scss, the way it says to do in the Bootstrap Sass gem setup instructions. But I almost never see it done that way anywhere else, people say to rename to application.css.scss.

Is there are particular reason most people use that method over the other that I should know about, or is it just preference? Does it make a difference?

Upvotes: 4

Views: 1161

Answers (1)

fbelanger
fbelanger

Reputation: 3568

There is no difference between .css.scss and .scss.

Some people argue that it's important to have the resulting file extension as part of the filename.

Example:

  • .css.scss
  • .js.coffee
  • .html.erb
  • .js.erb

A coworker of mine was adamant about this, where as my thinking was that it's only important for files where the resulting file can be many different types (i.e. .erb).

While SCSS and CoffeeScript can only generate CSS and JS respectively.

Upvotes: 2

Related Questions