Created
September 26, 2016 15:40
-
-
Save awhitehouse104/6fdfc6c06bc7b3c11bee4a0f0812f89a to your computer and use it in GitHub Desktop.
Base typography
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
@mixin define-font($size, $ratio, $margin: true) { | |
$lineHeight: $size * $ratio; | |
font-size: $size; | |
line-height: $lineHeight; | |
@if ($margin) { | |
margin-bottom: $lineHeight / 4; | |
} | |
} | |
* { | |
font-family: Arial, Helvetica, sans-serif; | |
font-style: normal; | |
} | |
p, h6, h5, h4, h3, h2, h1 { | |
margin: 0; | |
} | |
* { | |
@include define-font(1rem, 1.5, false); | |
} | |
p { | |
@include define-font(1rem, 1.5); | |
} | |
h6 { | |
@include define-font(1.25rem, 1.5); | |
} | |
h5 { | |
@include define-font(1.5rem, 1.5); | |
} | |
h4 { | |
@include define-font(1.75rem, 1.5); | |
} | |
h3 { | |
@include define-font(2rem, 1.25); | |
} | |
h2 { | |
@include define-font(2.5rem, 1.25); | |
} | |
h1 { | |
@include define-font(3rem, 1.25); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment