Closed ewingrj closed 5 years ago
I'm not sure about the rules for relative includes in the sass-compiler, therefore after looking at your sample, it might be that you have to write url(../../images/cover-bg-1.jpg)
since _bootstrap_startup_ui.scss
is two levels up.
Anyway, I prefer to specify include paths explicitly. You may use your SASS_PROCESSOR_INCLUDE_DIRS
and rewrite the above to url(core/images/cover-bg-1.jpg)
.
Otherwise extend SASS_PROCESSOR_INCLUDE_DIRS
; these values are passed into the compiler directly.
so changing it to url(images/cover-bg-1.jpg)
worked I guess relative urls are taken from the static/app/
path. I didn't need to change SASS_PROCESSOR_INCLUDE_DIRS
either.
With the following directory structure:
I have a rule in
_bootstrap_startup_ui.scss
like:style.scss
importssass/_bootstrap_start_ui.scss
after compilation & collectstatic, I end up with a single css file in
static/core/style.css
however the background url is stillurl(../images/cover-bg-1.jpg)
. It would need to beurl(images/cover-bg-1.jpg)
to point to the correct location.I'm not sure if this is a config issue or not?
Relevant
settings.py
: