Configuring Bootstrap using variables
Bootstrap 4 comes with opt-in flexbox support. You can enable flexbox support by switching a Boolean variable and recompiling your CSS. In this recipe you will learn how to do this.
Getting ready
As already mentioned, enabling flexbox support is as simple as switching a Boolean variable and recompiling your CSS. So, first read the Downloading and installing Bootstrap and the Customizing Bootstrap using variables recipes of this chapter. In this recipe, you also will make use of the page inspector of your browser.
There are two main ways to open the Inspector:
- Without an element selected: Choose the Inspector option from the Web Developer menu or the equivalent keyboard shortcut
- With an element selected: Right-click an element on a web page and select Inspect Element
How to do it...
You can not only use Sass variables to customize Bootstrap, you can also use some variables to configure it. The following steps will show you how to use a single Sass variable...