sass_compass_unleashed/presentation/05_variables.slides
2012-03-21 13:09:22 -04:00

53 lines
992 B
Plaintext

!SLIDE variable-layout
# Variables Definitions
!SLIDE bad-variables
``` scss
$height : 2px;
// There are 100 lines before this
.content_head {
@include clearfix;
.hr {
padding-top : (rhythm(1) / 2) - $height;
width : 100%;
border-bottom : $height solid $secondary-accent-color;
margin-bottom : 10px;
display : block;
@extend .float-right;
}
.release_identifiers {
@extend .float-right;
text-align : right;
font-family : $ancillary-font;
}
}
```
!SLIDE important
#Always define your variables at the top of each file!
!SLIDE big-list variable-why
* Easy to find
* Easy to update
* No surprises
!SLIDE
``` scss
/* Local Variables */
$release-content-height : rhythm(2);
$section-side-width : column-width(4) + $sidebar-width;
$group-image-height : rhythm(6);
.show {
h1 {
@include header(3);
@include trailer;
color : $primary-accent-color;
}
// ... goes on for 100+ lines
```