Search code examples
cssconfigurationsasscommentscompass

sass/compass file name in css output


I think there's is a way in sass, to have in the output css file, some comments for each class or tag definition, to get the sass file name (and maybe line) where they are.

for example :

scss file named _common.scss line 15 :

.classname{
  margin: 0;
}

css file output :

/* _common.scss on line 15 */
.classname{
  margin: 0;
}

Hope that i'm clear... Thanks for your help and sorry for my poor english. :)

X.


Solution

  • You need to set line_comments option to true in your compass configuration file config.rb. Compass config docs. I suggest you to take a further step and take a look at sourcemaps.