Created
November 16, 2015 07:48
-
-
Save artlesshand/904b8d76cf6296213bfd to your computer and use it in GitHub Desktop.
Generate headings relatively with Sass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// whatever size and number suits you | |
$font-size: 1.2rem; | |
$i: 3; | |
@each $h in h6, h5, h4, h3, h2, h1 { | |
#{$h} { | |
font-size: $font-size + $i; | |
line-height: $font-size * 2 + $i; | |
font-weight: bold; | |
} | |
// or maybe $i + .5 | |
$i: $i + 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment