Last active
March 8, 2016 12:24
-
-
Save veryrobert/1a80dd5d9b5fbf20f7a1 to your computer and use it in GitHub Desktop.
Font Mixin for Sizes
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
| @mixin phone { | |
| @media (max-width: #{$phone-width}) { | |
| @content; | |
| } | |
| } | |
| | |
| @mixin tablet { | |
| @media (max-width: #{$tablet-width}) { | |
| @content; | |
| } | |
| } | |
| | |
| @mixin desktop { | |
| @media (max-width: #{$desktop-width}) { | |
| @content; | |
| } | |
| } | |
| | |
| @mixin super { | |
| @media (max-width: #{$super-width}) { | |
| @content; | |
| } | |
| } | |
| | |
| @mixin max { | |
| @media (min-width: #{$super-width}) { | |
| @content; | |
| } | |
| } | |
| | |
| @mixin type($phone,$tablet,$desktop,$super,$lineheightratio,$font) { | |
| @include max { | |
| font: $super+px/($super*$lineheightratio)+px $font; | |
| //color: aqua; | |
| } | |
| @include super { | |
| font: $super+px/($super*$lineheightratio)+px $font; | |
| //color: black; | |
| } | |
| @include desktop { | |
| font: $desktop+px/($desktop*$lineheightratio)+px $font; | |
| //color: blue; | |
| } | |
| @include tablet { | |
| font: $tablet+px/($tablet*$lineheightratio)+px $font; | |
| //color: green; | |
| } | |
| @include phone { | |
| font: $phone+px/($phone*$lineheightratio)+px $font; | |
| //color: red; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment