summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/vendor/survival-kit/_headers.scss
blob: 8b998089566d95c1319108b16ded964ffe451594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Survival ✚ Kit

// Sets the font size specified in pixels using percents so that the base
// font size changes and 1em has the correct value. When nesting font size
// declarations, within the DOM tree, the base_font_size must be the parent's
// effective font-size in pixels.
// Usage Examples:
//   .big
//     +font-size(16px)
//   .bigger
//     +font-size(18px)
//   .big .bigger
//     +font-size(18px, 16px)
//
// For more information see the table found at http://developer.yahoo.com/yui/3/cssfonts/#fontsize
// From: compass-html5-boilerplate gem.

@function size($size, $base-font-size: $base-font-size) {
  @return ceil(percentage($size / $base-font-size));
}


// Calculate margin and line height according to the given size.
@mixin header-size($size) {
  font-size: size($size);
}

// Calculate the Header based on the H1 Max size.
@mixin htags-sizes($max) {
  $per: $max * 0.10;
  @for $i from 1 through 6 {
    h#{$i} {
      @include header-size($max - ($per * $i) );
    }
  }
}