Previously, I had a large file and styles.less about this structure:
Using SimpLESS 1.4 file styles.less compiled in styles.css and everything was fine.
The fact that the project is on a different hosting and depending on the settings files can be static or in a subdirectory or in a separate CDN. Then towards Kartik indicated relatively less-file inside:
Now the file was too big and I want to break it down into sub-files:
Content
As a result, code that is in the file
Is compiled into the following nonsense:
Is there a correct way to get around this behavior, provided that within less file, I do not know the direct path to the picture, only a relative.
project / | - Im / | | - Image-1.jpg | | - Image-2.png | | - Js / | | - Js-file-1.js | | - Js-file-2.js | | - Styles.css | - Styles.less
Using SimpLESS 1.4 file styles.less compiled in styles.css and everything was fine.
The fact that the project is on a different hosting and depending on the settings files can be static or in a subdirectory or in a separate CDN. Then towards Kartik indicated relatively less-file inside:
div { background: url('background.png'); }
Now the file was too big and I want to break it down into sub-files:
project / | - Im / | | - Image-1.jpg | | - Image-2.png | | - Js / | | - Js-file-1.js | | - Js-file-2.js | | - Less / | | - Lib.less | | - Foo.less | | - Bar.less | | - Styles.css | - Styles.less
Content
styles.less
: @import "less/lib"; @import "less/foo"; @import "less/bar";
As a result, code that is in the file
less/foo.less
: div { background: url('background.png'); }
Is compiled into the following nonsense:
div { background: url('less/less/background.png'); }
Is there a correct way to get around this behavior, provided that within less file, I do not know the direct path to the picture, only a relative.
0 commentaires:
Enregistrer un commentaire