Book Image

Learning Zurb Foundation

By : Kevin Horek
Book Image

Learning Zurb Foundation

By: Kevin Horek

Overview of this book

<p>Responsive web design is the next big thing in web design right now. It allows you to control and adapt to the user experience across a variety of devices, screens, and resolutions. Foundation is one of the most well-known responsive frameworks available, and allows you to speed up the prototyping, designing, and theming of your web project; as well as allowing you to create your own custom themes to suit your needs. It makes your life easier by giving you a grid, elements, and JavaScript functions that are responsive and easily customized to work with any web or mobile project that arises.</p> <p>This book starts off with teaching you the basics, and gradually moves on to cover the most advanced parts of this amazing framework. You will learn how to use Foundation to prototype, design, and theme your projects as well as discover how to use the framework with any programming language or content management system.</p>
Table of Contents (17 chapters)
Learning Zurb Foundation
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

What are mixins?


Mixins are blocks of code that you can reuse multiple times and when Sass gets compiled, they will be included and written out. Let's have a look at a simple mixin:

@mixin transition {
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease; 
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

Now, let's talk about the previous code. First, you will see @mixin. You need this on every mixin you create, as this tells Sass you are declaring a mixin. Then, you will see transition. This is just a name to describe what the mixin is for; it can be anything you like. As this mixin is for the transition CSS attribute, we will call it transition. If it was for rounded corners, we would call it something like @mixin rounded-corners {}. Now, you will see plain old CSS for all the different browser prefixes. Prefixes are used to make sure that all of the browsers can recognize the transition attribute. Now that we have the transition...