Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable SASS line numbers in CSS output?

How can I enable line numbers in CSS output if I am using SASS? I found an article but I didn't quite understand where to make the modifications

http://pivotallabs.com/users/damon/blog/articles/765-standup-04-07-2009-we-have-questions#comments

Could you help me?

like image 769
hex Avatar asked Dec 08 '25 10:12

hex


2 Answers

There's an option called :line_comments if you set this to true, Sass will place line numbers in your compiled output.

How to set this option depends on how you're using Sass. If it's in a Rails, Merb, or Rack application you can set Sass::Plugin.options[:line_comments] = true.

If you're using compass, set line_comments = false in your configuration file.

like image 195
chriseppstein Avatar answered Dec 10 '25 00:12

chriseppstein


If you happen to be using Sprockets and the sprockets-sass gem, you may need to do it like this:

Sprockets::Sass.options[:line_comments] = true
like image 39
Andrew Avatar answered Dec 10 '25 00:12

Andrew