I just started to work with CSS and espacialy Sass. What I tryed to do for the last hour was to set a background image from my source folder from my scss. file.
I tryed several ways of accesing my directory. But not a single one worked. My IDE (IntelliJ IDEA) always tells me that it can not resolve the directory. I tried:
background-image:url('${resource(dir: "images", file: "bg.png")}');
background-image:url(../images/bg.png);
background-image:url('../images/bg.png');
background-image:url(../images:bg.png);
background-image:url('../images:bg.png');
And also as refered in this topic How to refernce JSF image:
background-image: url("#{resource['images/bg.png']}");
I hope one of you can provide me with a solution.
EDIT
this line gives no error in the .scss file:
background-image:url("/resources/images/bg.png");
but it precompiles wrong in the .css file because the directory can not be resolved anymore.
EDIT
the code that does not get marked as problem in either .scss or .css is:
background-image:url("../../../src/resources/images/bg.png");
But it still does not work my background remains white.
