user3973427
user3973427

Reputation: 1435

How to use a `variables.less` file?

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

I now have the main bootstrap.css and a variables.less file that I've customised.

What do I do now, to make the variables.less file have effect?

Thanks

Upvotes: 7

Views: 2961

Answers (2)

Punit S
Punit S

Reputation: 3247

You'll have to download the bootstrap source (bootstrap less files), add your less file to that source and then compile to get a bootstrap.css that incorporates your changes.

Steps to download bootstrap source and compile it are here: http://getbootstrap.com/getting-started/

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

@import "myvariables.less";

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

Compile your bootstrap source to get bootstrap.css that should have your changes.

Upvotes: 0

Ruskin
Ruskin

Reputation: 6171

You need to compile your less files. Read more on http://lesscss.org/

Upvotes: 4

Related Questions