Book Image

Sass and Compass for Designers

By : Ben Frain
Book Image

Sass and Compass for Designers

By: Ben Frain

Overview of this book

Table of Contents (17 chapters)
Sass and Compass for Designers
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding the Sass globbing plugin to import batches of partial files


For users who like to break their style sheets into numerous partial files, it is worth knowing that folders full of partials can be imported using a single line of code. For example, at present in the styles.scss file, we have the following imports listed:

@import "partials/variables";
@import "partials/mixins";
@import "partials/fonts";
@import "partials/normalize";
@import "partials/base";
@import "partials/placeholders";
@import "partials/bb-grid";
@import "partials/layout";
@import "partials/modules";
@import "partials/chapter-examples";

Instead, to import all of those partials in one go with Sass globbing, we could do this:

@import "partials/*";

However, before proceeding, know two things. Sass globbing requires installing the Sass globbing plugin (no big deal). More importantly, with globbing, files are imported in an alphabetical order. This second point is particularly important.

If the order of imports is important...