Skip to content

Instantly share code, notes, and snippets.

@alienresident
Created February 21, 2014 20:48
Show Gist options
  • Save alienresident/9143174 to your computer and use it in GitHub Desktop.
Save alienresident/9143174 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.4)
// Compass (v1.0.0.alpha.18)
// ----
@mixin adjust-each-header($start, $finish, $startingFontSize: 30px, $adjustFont: 3px, $lineHeight: 1.618) {
@for $i from $start through $finish {
h#{$i} {
font-size: $startingFontSize;
line-height: getValue(($startingFontSize * $lineHeight));
}
$startingFontSize: $startingFontSize - $adjustFont;
}
}
@function getValue($n) {
@return $n / ($n * 0 + 1);
}
@include adjust-each-header(1, 6);
h1 {
font-size: 30px;
line-height: 48.54;
}
h2 {
font-size: 27px;
line-height: 43.686;
}
h3 {
font-size: 24px;
line-height: 38.832;
}
h4 {
font-size: 21px;
line-height: 33.978;
}
h5 {
font-size: 18px;
line-height: 29.124;
}
h6 {
font-size: 15px;
line-height: 24.27;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment