You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Ruby sass 3.4.5, and libsass (latest master); do not curate/normalize the images paths of the output. Less, on the other hand, has two options --rootpath and --relative-urls, which help its compiler fix the asset paths in the generated output (see less/less.js#2084 (comment)).
Sass compilers assume that you would write the code keeping the destination paths (of output and images) in mind. Less also has this as a default behavior, but provide that other option as well.
I think some folks would want to code Sass relative to current source file directory, without caring about the output's destination.
One of two ways to go about it:
A simple boolean variable check bool relative_urls (default: false), which would cause rewriting the urls relative to the output path, as the parser encounters any path.
A more complicated LESS like option string rootpath_slug (default: null) (in addition to relative_urls), which would take relative path from output to input file and apply it to each url to give more control in this kind of scenario: Custom-output-path-aware relative-URLs less/less.js#2084 (comment).