Skip to content

Instantly share code, notes, and snippets.

@veryrobert
Last active March 8, 2016 12:24
Show Gist options
  • Save veryrobert/1a80dd5d9b5fbf20f7a1 to your computer and use it in GitHub Desktop.
Save veryrobert/1a80dd5d9b5fbf20f7a1 to your computer and use it in GitHub Desktop.
Font Mixin for Sizes
@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