D
D
Dima Barsukov2014-12-11 16:47:02
Less
Dima Barsukov, 2014-12-11 16:47:02

How to cut out a part of a LESS file connected via @import?

The project uses bootstrap, I collect it grunt, while using my bootstrap.less, in which some unnecessary modules are turned off. The question is, is it possible to somehow disable part of the code from the imported file in order to reduce the output size?
For example, we include component-animations.less from the bootstrap, and on the site we will use only .collapse, and we do not need .fade. Not verbatim, but the gist is something like this.
The option is simple - copy component-animations.less to the project folder from the bower, add it to git and change it to your liking. But such a file will no longer be updated. And I would like to somehow just say that the .fade body needs to be removed. Or make it empty so that the compiled .css has .fade {}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aen, 2014-12-11
@aen

I think that only post-processing will help you here. https://github.com/postcss/postcss

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question