Repository navigation
Source range computation implementation for the SASS parser - #569
Conversation
…xpected by render_with_sourcemap
…t, add SASS sourcemap tests, fix Line.offset computation
|
👍 this provides a LOT of power. can't wait to see it. |
|
What does it do exactly ? |
|
Well the sourcemap can map all lines/columns from original sources into their destination CSS. What this enables on the tool side: ctrl-click any property/value/selector and go to the location in the sass/scss where that originates: the expression, mixin, variable where it was birthed or computed. This makes the editing experience of working with sass and tweaking CSS much more enjoyable. The UI side of the above is ready, and this PR enables the sourcemap that can deliver the mapping from sass to the tool. Down the line I can imagine editing values on the right styles pane of Chrome DevTools and changing the original scss source. |
|
Note that @paulirish says this feature is not SASS / SCSS specific and should work with any CSS pre-processing language. less/less.js#1038 |
|
When I run this command from my homedir (~): sass --load-path ~/Downloads/ --scss --cache-location --sourcemap ~/Downloads/test.scss ~/Downloads/output.cssIt creates the Is it possible to configure the location of the sourcemap? |
|
@ruudk: You did not specify the actual cache location after |
NB: This branch is based off of
sourcemap_fix_relpath, otherwise it would not make any sense.Sourcemaps can now be constructed for nodes built while parsing SASS (
engine.rb). A few fixes to the existing code have been made. All SCSS sourcemap tests have received their SASS counterparts.