I have this structure of my files:
lib/css/...
contains my styles divided into single .less files for each kind of area.
lib/style.less
is the file I want to gather my sub-style files into - and the file I want to be linked into the HTML.
When I type in (into style.less
):
@import url("/css/StyleToImport.less");
or
@import "/css/StyleToImport.less";
... I get a syntax error.
Is it really impossible to combine .less files into a single file?
It could be really handy to have 1 single file to contain all variables for colors, dimensions etc.
But as it is now, I have to use <link ...>
tags in HTML to every single file - which is not so handy.
P.S. I have read Join two .less files into one css file
and I have read this:
Importing
Importing works pretty much as expected. You can import a .less file, and all the variables in it will be available. If the file is a .less, the extension is optional:
@import "library";
@import "typo.css";