Krzysiek Szymczak Krzysiek Szymczak - 1 month ago 17
Sass (Sass) Question

SASS url() direct path

I use sass in my project. And have a problem:
The scss file is one lvl lower in directory that resulting css file. Because of that my compiler compile

url(#CSSLocator)
as
url(../#CSSLocator)
. I need to use that
url
function as location to filter (svg filter in this same file).

Do you know how to tell SASS compiler to treat this path directly as it is, not change it?

EDIT:

My directory structure is


content/main.scss

content/styles/main.css


and
filter: url('#GradientMap');
after compiling generate
url("../#GradientMap");
, probably because of the dir structure.

Answer

I haven't figured it out how to do this. I just hardcoded inline style in my html insted of fighting with Sass.

<img src="urlToPic" style="filter: url('#GradientMap');">