Dotless adding extra '../' directory path

87 views Asked by At

I have these variables:

@images-url: '../../../Images/';
@theme-images-url: '@{images-url}portal-themes/default/';
@theme-icons-url: '@{theme-images-url}icons/';

And this is how I use it:

background: url('@{theme-icons-url}buttonsheet.png') -2px no-repeat;

This works perfectly locally. However the images are missing on the server version. When I view the generated LESS file this is the resulting CSS:

background: url('../../../../Images/portal-themes/cgi/icons/buttonsheet.png') -2px no-repeat;

If I edit the server version to:

@images-url: '../../Images/';

Then the resulting CSS is:

background: url('../../../Images/portal-themes/cgi/icons/buttonsheet.png') -2px no-repeat;

This is obviously correct on the server but then broken on my local machine. I want to prevent this extra ../ been added so it works on both machines.

Why has an extra ../ been added to the start of my path on my server? I can't see any reason why this would happen.

0

There are 0 answers