Book Image

Getting Started with Zurb Foundation 4

By : Andrew D. Patterson
Book Image

Getting Started with Zurb Foundation 4

By: Andrew D. Patterson

Overview of this book

<p>Every web designer needs a toolkit. From text editors to graphics programs, from table structures to fluid style sheets, the web designer has many tools and techniques to choose from. Zurb's Foundation framework is an excellent kit for today's web designer. It's fluid, it's easy to work with, it has plenty of components, and most importantly, you can apply your creativity to make your very own designs.<br /><br />Zurb's Foundation 4 is a practical, easy-to-use toolkit for the layout and construction of web pages. Getting Started with Zurb Foundation 4 introduces Zurb Foundation’s powerful web design and development toolkit. Learn how to create professional layouts with ease, add powerful CSS and JavaScript components to your pages, and then customize and configure the design to your satisfaction. Understand how to efficiently manage your CSS and layout your pages with SASS, the style sheet language. This book will help you put Foundation 4 to work for you today!<br /><br />This book documents Foundation's grid system, all its components and plugins, and its generation of custom style sheets. The book serves as an all-encompassing introduction as well as a future reference guide. The foundation of Foundation is its grid system...and there is a whole lot more.<br /><br />Once you've covered the basics, you'll be ready to advance with SASS, the style sheet language, to customize your installation and layout your pages.<br /><br />With this book, you will discover all the CSS components and JavaScript plugins that are included in Foundation at the present time and learn how to integrate each of them into your web pages.</p>
Table of Contents (11 chapters)

Designing with SASS


Where do you start when designing your website layout? You probably start with your HTML markup and add Foundation's grid classes until you have something that meets your requirement. You'll be happy to learn that you can make this process even simpler by using Foundation's SASS grid components.

Let's start with a simple three-part layout:

<header>
<main>
<footer>

We want each of these to be an outside container, an outer row. So we'll add the SCSS code to do that. Put the following code in your custom SCSS file:

header { @include grid-row(); }
main { @include grid-row(); }
footer { @include grid-row(); }

When you compile your SCSS, you will see that the header, main, and footer elements all have the same properties that an outer row has in Foundation's style sheet. The beauty of this is that you do your markup in HTML as usual, mirror that in SCSS, and add appropriate mixins.

To show they are equivalent, here are the properties associated with the .row class...