It's time to find out about the hype behind SASS and Compass. Don't write plain old boring CSS when you can be using mixins, variables, and automatically-generated sprites.
should not be shared without permission. I. What are Sass & Compass II. How to install III. How to get started IV. Sass Syntax V. Compass Features WHAT WE WILL COVER
should not be shared without permission. Ruby gems Sass is a CSS preprocessor Compass is a framework that uses Sass Generates regular CSS files WHAT ARE SASS & COMPASS
should not be shared without permission. Almost no reason to not use Sass on every project that requires CSS. Almost no reason to use Sass and not Compass. Compass adds additional functionality without any downside. Rails project vs non-rails project HOW TO GET STARTED
should not be shared without permission. compass create <myproject> Creates all the files and folders you need config.rb sass stylesheets STANDALONE PROJECTS
should not be shared without permission. Create a sass or scss file in your sass_dir. compass watch on the command line Add CSS to this file, and it will auto generate a CSS file in your css_dir STANDALONE PROJECTS
Sass 3) is known as “SCSS” (for “Sassy CSS”), and is a superset of CSS3’s syntax. This means that every valid CSS3 stylesheet is valid SCSS as well. SCSS files use the extension .scss.
(or just “Sass”). Inspired by Haml’s terseness, it’s intended for people who prefer conciseness over similarity to CSS. Instead of brackets and semicolons, it uses the indentation of lines to specify blocks. Although no longer the primary syntax, the indented syntax will continue to be supported. Files in the indented syntax use the extension .sass.
should not be shared without permission. I used to hate nesting, but I have learned to really love it. It's not something you HAVE to use. Be careful that you don't go too far because the code can get sloppy and hard to read. NESTING
should not be shared without permission. The standard math operations (+, -, *, /, and %) are supported for numbers, even those with units. For colors, there are all sorts of useful functions for changing the lightness, hue, saturation, and more. OPERATIONS
should not be shared without permission. Kinda like mixins, but also kinda not. Replacement for mixins with no parameters. Extend only works for single elements Not possible: @extend .nav a EXTEND
should not be shared without permission. Compass gives you a whole bunch of prebuilt mixins to use. Import all of the CSS3 mixins @import "compass/css3"; Then you can use those mixins just like you would any other mixin. COMPASS FEATURES
should not be shared without permission. box-shadow font-face background-size and many more! compass-style.org/reference/compass/css3/ MANY MORE MIXINS
should not be shared without permission. Compass can automatically combine images, create sprites, and update your CSS. It's pretty amazing. SPRITING
should not be shared without permission. Sass: sass-lang.com Compass: compass-style.org Github Repo: git.io/5piz6Q LiveReload: livereload.com Codekit: incident57.com/codekit web: trevordavis.net twitter: @trevor_davis Thanks! Let’s Connect Resources