working with sass/compass and zurb foundation

26
Responsive Web Design Working with SASS/Compass and Zurb Foundation

Upload: clint-robinson

Post on 24-May-2015

1.784 views

Category:

Design


1 download

TRANSCRIPT

Page 1: Working with SASS/Compass and Zurb Foundation

Responsive Web Design

Working with SASS/Compass and Zurb Foundation

Page 2: Working with SASS/Compass and Zurb Foundation

What is SASS?SASS is an extension of CSS3, adding nested rules, variables, mixins,selector inheritance, and more.

Page 3: Working with SASS/Compass and Zurb Foundation

What is Compass?Compass is a stylesheet authoring framework that makes your stylesheets and markup easier to build and maintain. With compass, you write your stylesheets in SASS instead of plain CSS.

Page 4: Working with SASS/Compass and Zurb Foundation

What is Foundation?The most advanced responsivefront-end framework in the world.

Page 5: Working with SASS/Compass and Zurb Foundation

Getting startedgem install sass

gem install compass

gem install zurb-foundation

Page 6: Working with SASS/Compass and Zurb Foundation

Getting startedNavigate to your chosen directory in terminal

compass create <project-name> -r zurb-foundation --using foundation

Page 7: Working with SASS/Compass and Zurb Foundation
Page 8: Working with SASS/Compass and Zurb Foundation

Getting startedcompass watch

Page 9: Working with SASS/Compass and Zurb Foundation

What makes working with SASS and Foundation great?

Page 10: Working with SASS/Compass and Zurb Foundation

Lots of thingsThe gridNestingHandling of media queries Built-in functions(mixins)

Page 11: Working with SASS/Compass and Zurb Foundation

The grid<div class=”row”> <div class=”large-8 columns”> 8 column content </div> <div class=”large-4 columns”> 4 column content </div></div>

Page 12: Working with SASS/Compass and Zurb Foundation

The grid<div class=”row”> <div class=”large-8 small-6 columns”> 8 column content LARGE 6 column content SMALL </div> <div class=”large-4 small-6 columns”> 4 column content LARGE 6 column content SMALL </div></div>

Page 13: Working with SASS/Compass and Zurb Foundation

Nestingli { font: { family: serif; weight: bold; size: 1.2em; }}

Page 14: Working with SASS/Compass and Zurb Foundation

Nestingli { font-family: serif; font-weight: bold; font-size: 1.2em;}

Page 15: Working with SASS/Compass and Zurb Foundation

Nestinga { color: #ce4dd6; &:hover { color: #ffb3ff; } &:visited { color: #c458cb; }}

Page 16: Working with SASS/Compass and Zurb Foundation

Nestinga { color: #ce4dd6; }

a:hover { color: #ffb3ff; }

a:visited { color: #c458cb; }

Page 17: Working with SASS/Compass and Zurb Foundation

Media Queries@media (max-width: 600px) { insert hundreds of CSS selectors/rules}

Page 18: Working with SASS/Compass and Zurb Foundation

Media Queriesh1{ font-size: 2em; @media (max-width: 600px) { font-size: 1.6em; }}

Page 19: Working with SASS/Compass and Zurb Foundation

Media Queries$small-screen: emCalc(768);$medium-screen: emCalc(1280);$large-screen: emCalc(1440);

Page 20: Working with SASS/Compass and Zurb Foundation

Media Queries$screen: "only screen";

$small: "only screen and (min-width:"#{$small-screen}")";

$medium: "only screen and (min-width:"#{$medium-screen}")";

$large: "only screen and (min-width:"#{$large-screen}")";

$landscape: "only screen and (orientation: landscape)";

$portrait: "only screen and (orientation: portrait)";

Page 21: Working with SASS/Compass and Zurb Foundation

Media Queriesh1{ font-size: 1em; @media #{$small}{ font-size: 1.4em; } @media #{$medium}{ font-size: 1.6em; } @media #{$large}{ font-size: 2em; }

}

Page 22: Working with SASS/Compass and Zurb Foundation

Functions(mixins)$pink: #ce4dd6;

a { color: $pink; &:hover { color: darken($pink, 10%); } &:visited { color: darken($pink, 20%); }}

Page 23: Working with SASS/Compass and Zurb Foundation

Functions(mixins)a { color: #ce4dd6; }a:hover { color: #ba2dc3; }a:visited { color: #93239a; }

Page 24: Working with SASS/Compass and Zurb Foundation

Demohttp://clintrobinson.net

Page 25: Working with SASS/Compass and Zurb Foundation

Questions???

Page 26: Working with SASS/Compass and Zurb Foundation

Thank You!Clint Robinson - Advancement and Community Engagement

[email protected]