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...