Currently implementing the styling language known as LESS.
Take a look at the CSS below:
.side-bg
{
background:url(../img/layout/side-bg.jpg) top no-repeat;
}
At the moment, all images are stored in the directory ../img/
. I wanted to set a variable for the image path and use it like this:
@image-path: ../img;
.side-bg
{
background:url(@image-path/layout/side-bg.jpg) top no-repeat;
}
Unfortunately, this method did not work. It's not a major issue, as I can always use find and replace if the image folder location changes. As someone new to LESS, I was curious if achieving something like this is possible.