Removing unused helpers and utilities
The helpers and utilities of Bootstrap 5 are something that we use in addition to components, sometimes on specific code inside of a component, and sometimes as part of our own HTML code. Therefore, it can also be considered which of these we actually use, and make sure to not include the ones that we don’t use.
Removing unused helpers
In our code for the website, we have used the following helpers: Ratio, Position, Visually hidden, and Stretched link. The Bootstrap 5 code for these helpers is imported in our style.scss
file using the following code:
part-3/chapter-12/website/scss/style.scss
// Helpers @import "../../../../bootstrap/scss/helpers";
This will import the _helpers.scss
file containing @import
statements for the individual helpers. The content of that file is as follows:
part-3/chapter-12/website/bootstrap/scss/_helpers.scss
@import "helpers/clearfix"; @import "helpers/colored-links...