URLStyle
public enum URLStyle
How to reference source map resources from CSS.
There are two references here: the CSS pointing at the source map, and the source map
pointing at the original sources. The Sass compiler uses absolute (typically file:
) URLs
for original sources. This can be modified and the CSS -> source map reference added using
CompilerResults.withFileLocations(...)
.
If you plan to ship the source map (so it is accessed through http:
URLs by a browser)
then you need to use one of the .relative
options to avoid file:
URLs that won’t
make sense to clients.
Topics
case allAbsolute
case allAbsolute
Use absolute (file:
for filesystem files) URLs everywhere.
Declaration
case allAbsolute
case sourcesAbsolute
case sourcesAbsolute
Use absolute URLs in the source map to refer to the original sources, but use a relative URL to refer to the source map from the CSS.
Declaration
case sourcesAbsolute
case relative
case relative
Use relative URLs everywhere possible. For example if an original source is referenced
with an https:
or data:
URL then that version is preserved.
Declaration
case relative
case relativeSourceRoot(String)
case relativeSourceRoot(String)