Book Image

Bootstrap 4 Site Blueprints - Second Edition

By : Ian Whitney, David Cochran
Book Image

Bootstrap 4 Site Blueprints - Second Edition

By: Ian Whitney, David Cochran

Overview of this book

Packed with trade secrets, this second edition is your one-stop solution to creating websites that will provide the best experience for your users. We cover six popular, real-world examples, where each project teaches you about the various functionalities of Bootstrap 4 and their implementation. The book starts off by getting you up and running with the new features of Bootstrap 4 before gradually moving on to customizing your blog with Bootstrap and SASS, building a portfolio site, and turning it into a WordPress theme. In the process, you will learn to recompile Bootstrap files using SASS, design a user interface, and integrate JavaScript plugins. Towards the end of the book, you will also be introduced to integrating Bootstrap 4 with popular application frameworks such as Angular 2, Ruby on Rails, and React.
Table of Contents (15 chapters)
Bootstrap 4 Site Blueprints
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface

Importing files


The Sass compiling process makes it possible to import and combine multiple files into a single, unified CSS file. We can specify the order of import, and organize the resulting style sheet precisely as needed for our desired cascade.

Thus, Bootstrap's import file, bootstrap.scss, begins with imports for essential variables and mixins. Then, it imports a Sass version of normalize.css (in place of a CSS reset), followed by basic styles for print media. Then, it moves to core styles, including the new reboot module (_reboot.scss), typographic fundamentals (_type.scss), and more specific details. Thus, the first several lines of the current bootstrap.scss file are given as follows:

// Core variables and mixins 
@import "variables"; 
@import "mixins"; 
 
// Reset and dependencies 
@import "normalize"; 
@import "print"; 

The resulting CSS file will be a single, unified whole, with styles cascading down from the general to the specific, from components...