-3

I worked with bootstrap many times and usually I'am creating other style file where I'am overwriting bootstrap classes. I think it's better way to do this. I am also get annoying when I have too much code which I actually don't use in bootstrap source.

What's the best way to overwriting bootstrap classes and remove this parts of code which actually is not needed from bootstrap sources?

Pawel
  • 159
  • 1
  • 8

1 Answers1

1

One very common way is to use the Boostrap Sass implementation and set variables to define many of the styles. This prevents many css 'overrides' and usually results in much less css code.

You can also pick and choose which Bootstrap components to include (via @import) in the compiled css: https://getbootstrap.com/docs/4.0/getting-started/theming/#importing

https://getbootstrap.com/docs/4.0/getting-started/theming/

joknawe
  • 1,510
  • 11
  • 15
  • Yes, good way to overwriting bootstrap classes, but how to remove all code which is not needed? – Pawel Jul 05 '18 at 17:42
  • Using this method, you can also pick and choose which Bootstrap components to include in your build. https://getbootstrap.com/docs/4.0/getting-started/theming/#importing – joknawe Jul 05 '18 at 17:44