How it works...

Different from most of the main.scss files used throughout the recipes in this book, in this recipe, we are directly referencing multiple Sass partials. This allows us to turn them on and off by simply commenting out their respective includes. When we combine the addition or removal of specific scss partials with changes to the way that grunt compiles Sass to CSS, using the available options, we can significantly reduce the file size of the compiled CSS file.

However, even though this is useful for experiments, it is important to note that since the Bootstrap framework is so popular, it is probable that your browser has already cached the complete minified Bootstrap 4 code from some other web page. However, it is rarely the ...

Get Bootstrap 4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.