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

Creating multiple separate style sheets


The following is perhaps obvious but I feel worth explicitly stating. Suppose the need arises to supply two separate style sheets. Maybe one for small screen devices and another for large. Or perhaps one set using data URIs for image assets and another without. Whatever the reason, generating multiple, separate, CSS files can be achieved easily with Sass. Any Sass (for example, ending in .scss) file in the project that isn't defined as a partial (remember, the underscore before the filename indicates it is a partial) will automatically be compiled to a CSS equivalent.

Therefore, if there were three files (for example styles.scss, nav-png.scss, and nav-svg.scss) in the Sass folder, three CSS files will be generated (styles.css, nav-png.css and nav-svg.css) respectively from them.