I’ll quickly jot down how to use @import ‘path/to/file’ in LESS, because it is a little awkward on the path.
This might be something I’ve forgotten about, because I’ve probably done it before, but it just bugged me tonight, because I had to look for a solution again.
Including less files from a parent directory is easy
as long as you remember that you need to prepend ‘./’ in front of the path, which is different from webserver, linux filesystem and all kinds of other paths in the world. It would be nice if the language documentation or the compiler I’m using would state something about that.
If you don’t do this, you’ll get errors like “FileError ‘../path/to/bootstrap.less’ wasn’t found” and similar.
@import "./../flatstrap/assets/less/bootstrap"; @import "./../flatstrap/assets/less/responsive";