Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Source Maps: Add 'SourcesContent' support #212

@bdkjones

Description

@bdkjones

I see that source maps have made it to libsass!

However, it would be far better if they used the 'sourcesContent' property outlined in the official spec: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?hl=en_US&pli=1&pli=1#heading=h.lmz475t4mvbx

In short, you take each Sass file and dump its contents directly into the *.map file, in that sourcesContent array. The advantage to this is that it ELIMINATES problems with resolving the path from the CSS output file to the original Sass file. It makes source maps "just work". No futzing around with Chrome's DevTools workspaces, etc.

Yes, the *.map file is a little larger as a result, but that's okay because the only time we use that is during development --- it has no effect on the published website's load speed.

This should not be too hard to implement, either.

Most importantly, Less 1.5 has this ability. I would love to see Sass keep up.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions