Can you import .css files into .less files...?
I'm pretty familiar with less and use it for all my development. I regularly use a structure as follows:
@import "normalize";
//styles here
@import "mixins";
@import "media-queries";
@import "print";
All imports are other .less files and all works as it should.
My current issue is this: I want to import a .css file into .less that references styles used in the .css file as follows:
@import "../style.css";
.small {
font-size:60%;
.type;
}
// other styles here
The .css file contains a class called .type but when I try to compile the .less file I get the error NameError: .type is undefined
Will the .less file not import .css files, only other .less ones...? Or am I referencing it wrong...?!
.lessextension. Then reference it as a.lessfile. Being a symbolic link, it lifts off the burden to synchronize them as your .css changes immediately affect the .less file being imported. The drawback is that you should recompile the final css after subsequent changes. For info on creating symbolic links in Windows, typeMKLINK /?in a command window - Ivaylo Slavov.cssfile using the inline(less)directive and take advantage of the fact that.csssyntax is a valid.lesssyntax - ira