How to override less file of bootstrap in symfony2 with components/bootstrap?

562 views Asked by At

I'm using components/bootstrap bundle in my symfony2 project by composer to provide bootstrap. The less files are in /verdor/components/bootstrap/less/ and it will automatically make copies (maybe links?) to /web/components/bootstrap/less/

So, what is the correct way to do it if I want to make some changes to variables.less ?

Is there any way put my own variables.less file in /app/ folder like overriding twig templates?

1

There are 1 answers

0
Ian Lim On

You may take a look at the LESS structure used by bootswatch to customize bootstrap LESS files (https://github.com/thomaspark/bootswatch/)

Namely,

@import "../bower_components/bootstrap/less/bootstrap.less";
@import "variables.less"; // Your own variables.less
@import "global.less"; // Your own LESS files
@import "bootswatch.less"; // Your own LESS files
@import "../bower_components/bootstrap/less/utilities.less";