Closed Bug 1039724 Opened 10 years ago Closed 6 years ago

.map files that point to an SCSS source file with Windows style newlines does not map correctly


(DevTools :: Style Editor, defect, P2)

30 Branch
Windows 7


(Not tracked)



(Reporter: kyledevans, Unassigned, NeedInfo)


(Blocks 1 open bug)



(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

1) Create a Style.scss stylesheet with Windows-style newlines (CR + LF)
2) Compile Style.scss with the "compressed" method and make sure that it also outputs a .map file.
3) Use the minified CSS output on a test page
4) Open the test page and open the developer tools.  Go to the Style Editor.
5) Click on the Style.scss tab

Actual results:

There appears to be double-spacing between every line on the Style Editor page.

Expected results:

The style editor shouldn't be double spacing every line.  SCSS should be formatted the same way as any text editor that understands the difference between unix line endings and windows line endings.
My current workaround is to save SCSS files with Unix style line endings.  This appears to work fine in Visual Studio.  It would be nice however to not have to tell my fellow developers that they need to remember that SCSS files are special snowflakes.
Component: Untriaged → Developer Tools: Style Editor
_style.scss in editor state
_style.scss as output from Style Inspector 'Save' option
Same for me with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
I've found that using the Visual Studio addon "Strip'em" works well for automatically saving the line endings in the unix format.  It's lightweight and hasn't given me any problems.

Here's the configuration string I use: .*\.(scss|js)$

This setup makes scss and javascript save with unix-style line endings.  I do this for javascript also because I seem to have issues using the firefox debugger.  Occasionally breakpoints and stepping through code do not seem to match the line that is is highlighted.  I have no idea if this helps the javascript issue because I primarily debug using console.log().
(In reply to Kyle Evans from comment #5)
Well, for me, Inline Live Editing (as described in ) would be a major time saver at some occasions in development cycle. But with my current setup this bug is hindering that by default.
Ever confirmed: true
Priority: -- → P2
Blocks: source-maps
I tried this with a simple example .sass file.
I made sure it had \r\n line endings and then ran:
sass --update -f -t compressed --sourcemap=auto ta.scss

As far as I can tell the inspector and the style editor work fine now.
(I'm using a recent M-C build, didn't try anything older.)
Not sure why I didn't set a NI on this the other day.
Can you try it again with nightly and see if it is still a problem for you?
Flags: needinfo?(kyledevans)
6 months without a reply, and it works for me.
Feel free to reopen if it's still a problem.
Closed: 6 years ago
Resolution: --- → WORKSFORME
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.