Exploring the Bootstrap 5 variables
To customize any element of Bootstrap 5, you will start by looking at the _variables.scss
file. This file contains all the variables used by Bootstrap 5, including variables for global options, colors, layout, content (including typography), forms, components, helpers, and utilities. So, for example, to know which part of a component can be customized, you simply need to search for the component name within the _variables.scss
file. Then, you will find all the relevant variables with their default values grouped together. You now need to use these same variable names in your own Sass file to change it. You will learn exactly how to do this in the next chapter.
The variables have been carefully ordered by the team behind Bootstrap since some variables reference other variables. The order in which the variables for different components appear is not alphabetical, so my best suggestion to find them is to scroll through the file or search for the...