How to use the `variables.less` file?

I have been using Bootstrap in my website development for some time, but I have never had to use the variables.less file in a project.

Now I have the main bootstrap.css and variables.less file that I configured.

What should I do now to create a variables.less file?

thanks

+5
source share
2 answers

You need to compile fewer files. Read more about http://lesscss.org/

+3
source

You will need to download the initial bootstrap file (upload fewer files), add fewer files to this source and then compile to get bootstrap.css, which includes your changes.

The steps for downloading the source file and compiling it are here: http://getbootstrap.com/getting-started/

Before compiling, add your custom less file import to bootstrap.less

 @import "myvariables.less"; 

Be sure to add this import as the last import so that your changes are not overridden.

Compile your bootstrap source to get bootstrap.css, which should have your changes.

0
source

Source: https://habr.com/ru/post/1203711/


All Articles