How do you override the default Bootstrap CSS?

  • Load your CSS after the Bootstrap CSS.
  • Change the CSS variables: for a button use --bs-btn-bg, --bs-btn-border-color, and for the page use --bs-body-font-family, --bs-border-radius.
  • If a rule does not win, make your selector a little more specific. Avoid !important when possible.
  • For a big change, use Sass variables.
  • Never edit the files in node_modules or the downloaded Bootstrap files.

See Bootstrap Customization.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.