Created
April 14, 2014 17:17
-
-
Save jdsteinbach/10666791 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
| // ---- | |
| // Sass (v3.3.4) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| $type-scale: 1.345; | |
| $site-base: 26; | |
| $base-font: 26; | |
| $font-sizes: ( | |
| sm: 0, | |
| p: 1, | |
| ssh: 2, | |
| sh: 3, | |
| h: 4, | |
| hero: 5 | |
| ); | |
| $rhythm: $base-font * $type-scale; | |
| @function ms($num) { | |
| $return: ( 1 / $type-scale ); | |
| @if $num == 0 { | |
| @return $return; | |
| } @else { | |
| @for $i from 1 through $num { | |
| $return: $return * $type-scale; | |
| } | |
| @return $return; | |
| } | |
| } | |
| @function get-size($name) { | |
| $size: map-get($font-sizes, $name); | |
| $size: $base-font * ms($size); | |
| @return $size; | |
| } | |
| @mixin lh-rhythm($fs) { | |
| $lh: 0; | |
| @while $lh < $fs { | |
| $lh: $lh + $rhythm; | |
| } | |
| line-height: round($lh / $fs*100)/100; | |
| } | |
| @each $label, $ms-level in $font-sizes { | |
| $size: $base-font * ms($ms-level); | |
| %#{$label} { | |
| font-size: round($size * 1px); | |
| font-size: round($size / $site-base*100)/100 * 1rem; | |
| @include lh-rhythm(get-size($label)); | |
| } | |
| } | |
| .site-title { | |
| @extend %hero; | |
| } | |
| .post { | |
| p { | |
| @extend %p; | |
| } | |
| .meta { | |
| @extend %sm; | |
| } | |
| h1 { | |
| @extend %h; | |
| } | |
| h2 { | |
| @extend %sh; | |
| } | |
| h3 { | |
| @extend %ssh; | |
| } | |
| } |
This file contains hidden or 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
| .post .meta { | |
| font-size: 19px; | |
| font-size: 0.74rem; | |
| line-height: 1.81; | |
| } | |
| .post p { | |
| font-size: 26px; | |
| font-size: 1rem; | |
| line-height: 1.35; | |
| } | |
| .post h3 { | |
| font-size: 35px; | |
| font-size: 1.35rem; | |
| line-height: 1; | |
| } | |
| .post h2 { | |
| font-size: 47px; | |
| font-size: 1.81rem; | |
| line-height: 1.49; | |
| } | |
| .post h1 { | |
| font-size: 63px; | |
| font-size: 2.43rem; | |
| line-height: 1.11; | |
| } | |
| .site-title { | |
| font-size: 85px; | |
| font-size: 3.27rem; | |
| line-height: 1.23; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment