| z, ? | toggle help (this) |
| space, → | next slide |
| shift-space, ← | previous slide |
| d | toggle debug mode |
| ## <ret> | go to slide # |
| c, t | table of contents (vi) |
| f | toggle footer |
| r | reload slides |
| n | toggle notes |
| p | run preshow |
* Until about 2.5 years ago * Nov 2009 * The Change Log episode 0.0.1 * Nathan Weizenbaum & Chris Eppstein
$font-color: #3B3330;
$sans-family: Helvetica, FreeSans, ↵
"Nimbus Sans L", Arial, sans-serif; ↵
$fancy-sans-family: "dejarip-1", ↵
"dejarip-2", $sans-family;
h1 {
font-family: $fancy-sans-family;
color: $font-color;
}
$font-size: 12 !default;
.nav {
font-family: $sans-family;
ul, ol {
list-style: none;
list-style-image: none;
}
}
.nav {
…
a {
&:hover, &:focus {
color: $link-hover-color;
}
}
}
background: {
color: $nav-bg-hover;
image: url("nav-bg.png");
repeat: no-repeat;
}
/* Standard CSS style Comment
It will show up in the CSS */
// Sass comment.
// This will not show up in the CSS.
html body > section > header ↵
{color: green;}
html body > section > header > article ↵
> header {color: purple;}
It's just a tool doing whatever you tell it too!
$font-color: #3B3330
$sans-family: Helvetica, FreeSans, ↵
"Nimbus Sans L", Arial, sans-serif
$fancy-sans-family: "dejarip-1", ↵
"dejarip-2", $sans-family
.nav
font-family: $sans-family
ul, ol
list-style: none
list-style-image: none
…
a
background-color: $nav-bg-color
&:hover, &:focus
color: $link-hover-color
background:
color: $nav-bg-hover
image: url("nav-bg.png")
repeat: no-repeat
site.scss, site.sass
site.css.scss, site.css.sass
Store in a ./lib Sub-directory of the Sass files
Partials start with an underscore e.g. _nav.scss
and are imported in the following way
@import "lib/nav";
@import "nav";
@mixin wrap($wrap-width) {
margin: 0 auto;
overflow: hidden;
text-align: left;
max-width: $wrap-width;
}
#wrapper {
@include wrap(960px);
}
.clearfix {
…
&:after {
…
}
}
.main {
@extend .clearfix
}
.clearfix, .main {
…
}
.clearfix:after, .main:after {
…
}
.main {
…
}
@mixin single-text-shadow( ↵
$color: $default-text-shadow-color, ↵
$hoff: $default-text-shadow-h-offset, ↵
$voff: $default-text-shadow-v-offset, ↵
$blur: $default-text-shadow-blur ↵
) {
// XXX I'm surprised we don't need
// experimental support for this property.
@if $color == none {
text-shadow: none; }
@else {
text-shadow: $color $hoff $voff $blur; } }
@for
@each
@while
$base-font-size: 12 !default;
@function pxs2ems( ↵
$px: 0, ↵
$context: $base-font-size
) {
$ems: ($px / $context) * 1em;
@return $ems;
}
h1 {
font-size: pxs2ems(24, 12);
}
/* --------------------------------- */
/* Navigation */
/* --------------------------------- */
// Typography
$font-color: #3b3330;
$sans-family: Helvetica, FreeSans, "Nimbus Sans L", ↵
Arial, sans-serif;
$fancy-sans-family: "dejarip-1", "dejarip-2", ↵
$sans-family;
// Nav colors
$link-hover-color: blue;
$nav-bg-color: $font-color;
$nav-bg-hover: lighten($nav-bg-color, 20%);
.nav {
font-family: $sans-family;
ul, ol {
list-style: none;
list-style-image: none; }
a {
background-color: $nav-bg-color;
&:hover, &:focus {
color: $link-hover-color;
background: {
color: $nav-bg-hover;
image: url("nav-bg.png");
repeat: no-repeat; }; } } }
/* --------------------------------- */
/* Navigation */
/* --------------------------------- */
.nav {
font-family: Helvetica, FreeSans, "Nimbus Sans L", ↵
Arial, sans-serif; }
.nav ul, .nav ol {
list-style: none;
list-style-image: none; }
.nav a {
background-color: #3b3330; }
.nav a:hover, .nav a:focus {
color: blue;
background-color: #73645e;
background-image: url("nav-bg.png");
background-repeat: no-repeat; }
/* --------------------------------- */
/* Navigation */
/* --------------------------------- */
.nav {
font-family: Helvetica, FreeSans, "Nimbus Sans L", ↵
Arial, sans-serif;
}
.nav ul, .nav ol {
list-style: none;
list-style-image: none;
}
.nav a {
background-color: #3b3330;
}
.nav a:hover, .nav a:focus {
color: blue;
background-color: #73645e;
background-image: url("nav-bg.png");
background-repeat: no-repeat;
}
/* --------------------------------- */
/* Navigation */
/* --------------------------------- */
.nav { font-family: Helvetica, FreeSans, "Nimbus Sans L", ↵
Arial, sans-serif; }
.nav ul, .nav ol { list-style: none; ↵
list-style-image: none; }
.nav a { background-color: #3b3330; }
.nav a:hover, .nav a:focus { color: blue; ↵
background-color: #73645e; background-image: url("nav-bg.png"); ↵
background-repeat: no-repeat; }
.nav{font-family:Helvetica,FreeSans,"Nimbus Sans L",Arial,sans-serif}.nav ul,.nav ol{list-style:none;list-style-image:none}.nav a{background-color:#3b3330}.nav a:hover,.nav a:focus{color:blue;background-color:#73645e;background-image:url("nav-bg.png");background-repeat:no-repeat}
:line_comments => true,
:debug_info => true
Just about everything under the Sun.
Alex Lemanski
@bitfyre | email

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.