2 ms·
The biggest problem that I have with Sass is that the file/line references in your developer tools point at the compiled CSS files, and so you don't have any re
by nagash 16y ago
The biggest problem that I have with Sass is that the file/line references in your developer tools point at the compiled CSS files, and so you don't have any real reference to where in your Sass files that style is defined. Any solution for this?
- panpainter 16y agoThere actually is; SASS has built-in functionality that will actually inject the source filename/line-number in to the generated CSS. Additionally, Nathan Weizenbaum (one of the HAML/SASS maintainers) released a Firefox/Firebug add-on that will read this and display it in Firebug like it does for traditional CSS. More on debug-mode: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#debug_info-option http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#de... Grab the Firefox add-on here: https://addons.mozilla.org/en-US/firefox/addon/firesass-for-firebug/ https://addons.mozilla.org/en-US/firefox/addon/firesass-for-...
- robflynn 16y agoFor me, at least in my rails project using Sass (scss): Development mode also creates inline comments in the generated CSS which describe where, in the original scss, the information can be found. What an awkward sentence. I need sleep.
- lynnwallenstein 16y agoAnother option if you are using something like rails is in your development mode just link to the individual CSS files (http://forrst.com/posts/Rails3_Linking_to_CSS_Differently_Depending_on-gkN http://forrst.com/posts/Rails3_Linking_to_CSS_Differently_De...)
- zefhous 16y agoYes, Sass provides a setting that prints the source line numbers with the compiled CSS for development. I think this is on by default, but you can turn it on in the config file with: Sass::Plugin.options[:line_comments] = true # or with compass: sass_options = {:line_comments => true} Sass compiles code like this: /* line 138, sass/screen.sass */ #navigation a:hover {...} I guess it can be a problem sometimes, but I don't usually have issues with it and find that the organizational benefits outweigh the drawbacks by a long shot.
- deleted 16y ago[deleted]
- dogonwheels 16y agoI think the line_comments option might be some help.
- chadcf 16y agoIf you are using Firefox/Firebug you can try this: https://addons.mozilla.org/en-US/firefox/addon/firesass-for-firebug/ https://addons.mozilla.org/en-US/firefox/addon/firesass-for-... Doesn't seem to support FF4 yet though.