Closed
Description
Redirected from: #489 (comment)
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).