Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Missing Bootstrap 5 Guide

You're reading from   The Missing Bootstrap 5 Guide Customize and extend Bootstrap 5 with Sass and JavaScript to create unique website designs

Arrow left icon
Product type Paperback
Published in Aug 2022
Publisher Packt
ISBN-13 9781801076432
Length 384 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jeppe Schaumburg Jensen Jeppe Schaumburg Jensen
Author Profile Icon Jeppe Schaumburg Jensen
Jeppe Schaumburg Jensen
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part One – Customizing Bootstrap 5 with Sass
2. Chapter 1: Why and How to Customize Bootstrap FREE CHAPTER 3. Chapter 2: Using and Compiling Sass 4. Chapter 3: Downloading and Exploring the Bootstrap 5 Sass Files 5. Chapter 4: Bootstrap 5 Global Options and Colors 6. Chapter 5: Customizing Various Bootstrap 5 Elements 7. Chapter 6: Understanding and Using the Bootstrap 5 Utility API 8. Part Two – Creating a Unique-Looking Website Based on Bootstrap 5 and Customization
9. Chapter 7: Creating the Website Using Default Bootstrap 5 Elements 10. Chapter 8: Customizing the Website Using Bootstrap 5 Variables, Utility API, and Sass 11. Chapter 9: Improving the Website with Interactive Features Using JavaScript 12. Part Three – Advanced Topics Related to Bootstrap 5
13. Chapter 10: Using Bootstrap 5 with Advanced Sass and CSS Features 14. Chapter 11: Using Bootstrap 5 with Advanced JavaScript Features 15. Chapter 12: Optimizing Bootstrap 5 CSS and JavaScript Code 16. Other Books You May Enjoy

Chapter 12: Optimizing Bootstrap 5 CSS and JavaScript Code

In this chapter, we’re not going to use Bootstrap 5 to create any new user interfaces or customize any existing ones. We won’t even look at any of the source code contained in the Bootstrap 5 files. Instead, we will see how we can optimize our compiled Bootstrap 5 CSS and JavaScript code after we have finished creating our website.

We will first concentrate on optimizing our stylesheet by only including the Bootstrap 5 Sass partials we actually use and removing all the helpers and utilities that we don’t use. Then we will use Node.js, NPM, and Laravel Mix to set up a build process to automate some tasks that will help us bundle only the JavaScript that our components actually use and minify both our compiled CSS and bundled JavaScript.

In this chapter, we’re going to cover the following main topics:

  • Including the Sass partials for the used components only
  • Removing unused helpers...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime