2012-03-14 15:55:13 +00:00
!SLIDE
# Compass
2012-03-15 22:14:04 +00:00
## http://compass-style.org
2012-03-14 15:55:13 +00:00
!SLIDE
* Stylesheet framework
* Considered sass standard library
* Standalone application
* Has the ability to have application integrations (rails, django, etc.)
!SLIDE
## Currently the only application integration supported by the core team is rails
!SLIDE big-list
## Features
* Sprites
* CSS3
* Layout tools
* And much more
!SLIDE
# Sprites!
2012-03-21 17:09:22 +00:00
!SLIDE medium-list
2012-03-14 15:55:13 +00:00
* Fewer http requests.
* You don't have a bunch of individual images to manage.
* Customizable
* ITS EASY!
!SLIDE
# This EASY!
``` scss
@import "my-icons/*.png";
@include all-my-icons-sprites;
```
!SLIDE
## BAM!
``` scss
.my-icons-sprite,
.my-icons-delete,
.my-icons-edit,
.my-icons-new,
2012-03-21 17:09:22 +00:00
.my-icons-save {
background: url('/images/my-icons-s34fe0604ab.png') no-repeat;
}
2012-03-14 15:55:13 +00:00
.my-icons-delete { background-position: 0 0; }
.my-icons-edit { background-position: 0 -32px; }
.my-icons-new { background-position: 0 -64px; }
.my-icons-save { background-position: 0 -96px; }
```
2012-03-21 17:09:22 +00:00
!SLIDE
2012-03-14 15:55:13 +00:00
2012-03-21 17:09:22 +00:00
# Sprite Layouts
2012-03-14 15:55:13 +00:00
2012-03-21 17:09:22 +00:00
!SLIDE
## Vertical (default)
<img src='/assets/vert.png' >
2012-03-14 15:55:13 +00:00
2012-03-21 17:09:22 +00:00
!SLIDE
## Horizontal
<img src='/assets/horizontal.png' >
!SLIDE
## Diagonal
<img src='/assets/diagonal.png' >
!SLIDE
## Smart
<img src='/assets/smart.png' >
2012-03-14 15:55:13 +00:00
!SLIDE
# Magic Selectors
* my-buttons/glossy.png
* my-buttons/glossy_hover.png
* my-buttons/glossy_active.png
* my-buttons/glossy_target.png
!SLIDE
# Example
``` scss
@import "my-buttons/*.png";
a {
@include my-buttons-sprite(glossy)
}
```
!SLIDE
# BAM!
``` scss
.my-buttons-sprite, a {
background: url('/my-buttons-sedfef809e2.png') no-repeat;
}
a {
background-position: 0 0;
}
2012-03-21 17:09:22 +00:00
a:hover, a.glossy-hover {
2012-03-14 15:55:13 +00:00
background-position: 0 -40px;
}
2012-03-21 17:09:22 +00:00
a:target, a.glossy-target {
2012-03-14 15:55:13 +00:00
background-position: 0 -60px;
}
2012-03-21 17:09:22 +00:00
a:active, a.glossy-active {
2012-03-14 15:55:13 +00:00
background-position: 0 -20;
}
```
!SLIDE important
# Beware of your file size!
!SLIDE
2012-03-21 17:09:22 +00:00
# We support most CSS3 properties with vendor prefix's.
!SLIDE big-list
* Gradients
* Shadows
* Box model
* Transitions
* Much more
2012-03-14 15:55:13 +00:00
!SLIDE big-list
# Layout tools
2012-03-21 17:09:22 +00:00
* Grid
2012-03-14 15:55:13 +00:00
* Vertical rhythm
* And more!
2012-03-21 17:09:22 +00:00
!SLIDE
<div class='standard-grid' ></div>
!SLIDE grid-slide-scss
``` scss
.grid {
@include grid-background($total, $column, $gutter, $baseline,
$offset, $column-color, $gutter-color,
$baseline-color, $force-fluid)
}
```
2012-03-14 15:55:13 +00:00
!SLIDE
# Vertical rhythm
## The spacing and arrangement of text as the reader descends the page.
!SLIDE
## "Just as regular use of time provides rhythm in music, so regular use of space provides rhythm in typography, and without rhythm the listener, or the reader, becomes disorientated and lost." - 24ways.org
!SLIDE
<div class='grid' ></div>
2012-03-15 22:14:04 +00:00
!SLIDE
2012-03-21 17:09:22 +00:00
<img src='/assets/rhythm_layout.png' width="700px">
!SLIDE medium-list
2012-03-15 22:14:04 +00:00
2012-03-21 17:09:22 +00:00
* Height : rhythms
* Width : columns
2012-03-15 22:14:04 +00:00
!SLIDE
2012-03-21 17:09:22 +00:00
``` scss
$release-content-height : rhythm(2);
$section-side-width : column-width(4);
$primary-image-caption-line-height : floor($base-line-height / 2);
$group-image-height : rhythm(6);
.contents .show {
h1 {
@include header(3);
@include padding-leader;
@include trailer;
color : $primary-accent-color;
}
// etc ...
```
2012-03-15 22:14:04 +00:00
!SLIDE
2012-03-21 17:09:22 +00:00
<img src='/assets/vert_rhythm_bad.jpg' >
http://coding.smashingmagazine.com/2009/04/03/8-simple-ways-to-improve-typography-in-your-designs/
!SLIDES
# Extensions
* fancy-buttons
* sassy-buttons
* susy
* blueprint
* twitter-bootstrap
* etc...
!SLIDE
<img src='/assets/fancy-buttons.png' >
2012-03-15 22:14:04 +00:00
2012-03-14 15:55:13 +00:00