A
A
Andrey Khokhlov2015-01-26 15:12:18
Less
Andrey Khokhlov, 2015-01-26 15:12:18

How to import an entire folder (LESS)?

The common.less file looks like

@import "helpers/variables.less";
@import "helpers/mixins.less";

@import "base/fonts.less";
@import "base/reset.less";
@import "base/base.less";

@import "blocks/one.less";
@import "blocks/two.less";
@import "blocks/three.less";

When assembled by Grunt, this file is compiled to css accordingly.
Is it possible to import whole folders at once without listing files individually? (it seems to be possible in stylus)
@import 'blocks/**/*'
PS Yes, I know that the problem of controlling the order of included styles can be solved by correcting Grunt's task)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Nalomenko, 2015-01-26
@andrhohlov

You can use the grunt-less-imports module
More details on stackoverflow , this question has already been raised there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question