Created
March 16, 2015 10:50
-
-
Save hanspagel/418aeb18c1a152e91c75 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.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
// Breakpoints | |
$tiny: 320; | |
$small: 480; | |
$medium: 800; | |
// Mixin | |
@mixin font-sizes($default, $sizes) { | |
font-size: $default; | |
@each $breakpoint, $size in $sizes { | |
@media all and (min-width: $breakpoint) { | |
font-size: $size; | |
} | |
} | |
} | |
// Example | |
.h1 { | |
@include font-sizes( | |
36, | |
( | |
$tiny: 40, | |
$small: 50, | |
$medium: 70 | |
)); | |
} |
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
.h1 { | |
font-size: 36; | |
} | |
@media all and (min-width: 320) { | |
.h1 { | |
font-size: 40; | |
} | |
} | |
@media all and (min-width: 480) { | |
.h1 { | |
font-size: 50; | |
} | |
} | |
@media all and (min-width: 800) { | |
.h1 { | |
font-size: 70; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment