Loading
akoebbe
This is a live streamed presentation. You will automatically follow the presenter and see the slide they're currently on.
(backward compatible with CSS. We'll use this today)
article {
font-size: 16px;
color: blue;
{
article
font-size: 16px
color: blue
// Colors
$header-bg-color: #ffeeee;
$font-color: rgba(200,225,180,0.7);
$border-color: hsl(300, 75%, 50%);
// Units
$header-height: 30px;
$base-font-size: 2em;
// Strings and Lists
$cool-class: "way-cool";
$body-font-family: "Lato",Helvetica,Arial,sans-serif;
// Booleans
$is-this-thing-on: true;
// Maps
$header: (
style: italic,
weight: bold,
)
heading.#{$cool-class} {
background-color: $header-bg-color;
height: $header-height;
@if $is-this-thing-on {
font: $body-font-family;
}
font-style: map-get($header, style);
}
heading.way-cool {
background-color: #ffeeee;
height: 30px;
font: "Lato", Helvetica, Arial, sans-serif;
font-style: italic;
}
article {
background-color: slateblue;
h1 {
font-family: sans-serif;
}
a {
color: yellow;
&:hover {
font-weight: bold;
}
}
}
article {
background-color: slateblue;
}
article h1 {
font-family: sans-serif;
}
article a {
color: yellow;
}
article a:hover {
font-weight: bold;
}
// Unit Math (units must match)
$header-height: 80px + 20px;
$footer height: ($header-height / 2); //Put division in parenthesis
// Color Math
$new-color: #bb33dd + #113311;
$another-color: #010203 * 2;
$dark-color: darken($another-color, 10);
// Math Functions
$rounded-number: round(1.5);
$floored-number: floor(1.9);
.error {
border: 1px #f00;
background-color: #fdd;
}
.serious-error {
@extend .error;
border-width: 3px;
}
.error, .serious-error {
border: 1px #f00;
background-color: #fdd;
}
.serious-error {
border-width: 3px;
}
@mixin link-color($base-color, $border-width: 1px) {
color: $base-color;
&:hover {
color: darken($base-color, 20);
border-bottom: $border-width solid complement($base-color);
}
}
a {
@include link-color(yellow);
{
Compiled CSS
a {
color: yellow;
}
a:hover {
color: #999900;
border-bottom: 1px solid blue;
}
$ sudo gem install sass
$ sudo apt-get install ruby
$ sudo gem install sass
C:\>gem install sass