Closed rayronvictor closed 8 years ago
bootstrap.config.less
is designed to override bootstrap variables - https://github.com/gowravshekar/bootstrap-webpack#bootstrapconfigless
To make this crystal clear, use:
bootstrap.config.less
to overwrite bootstrap variables like @brand-primary
.navbar-brand
into a separate style file. If you add them to bootstrap.config.less
you will loose those changes as they will be overwritten by the original bootstrap css-selectors. This is especially dangerous, as all css-selectors you add to bootstrap.config.less
which have no definition in bootstrap will work.It took me a couple hours to realize this limitation fact, so maybe this post help others to find the flaw in their mental model earlier than I was able to.
I'm trying to override the
.has-error .form-control
inbootstrap/less/forms.less
.my_styles/theme/_forms.less:
But it seems that the bootstrap-webpack is importing my style first and then importing the bootstrap styles. The generated css looks like:
Indeed, you are importing the bootstrap.config.less first.