Created
June 27, 2015 10:12
-
-
Save airen/054c1a144604d6668e70 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
$breakpoints: ( | |
small : 480px, | |
medium: 700px, // Previously 640px | |
large : 1024px | |
); | |
$p-font-sizes: ( | |
null : 15px, | |
small : 16px, | |
medium: 17px, | |
900px : 18px, | |
large : 19px, | |
1440px: 20px, | |
); | |
$h1-font-sizes: ( | |
null : 28px, | |
small : 31px, | |
medium: 33px, | |
large : 36px | |
); | |
@mixin font-size($fs-map, $fs-breakpoints: $breakpoints) { | |
@each $fs-breakpoint, $fs-font-size in $fs-map { | |
@if $fs-breakpoint == null { | |
font-size: $fs-font-size; | |
} | |
@else { | |
// If $fs-font-size is a key that exists in | |
// $fs-breakpoints, use the value | |
@if map-has-key($fs-breakpoints, $fs-breakpoint) { | |
$fs-breakpoint: map-get($fs-breakpoints, $fs-breakpoint); | |
} | |
@media screen and (min-width: $fs-breakpoint) { | |
font-size: $fs-font-size; | |
} | |
} | |
} | |
} | |
p { | |
@include font-size($p-font-sizes); | |
} |
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
p { | |
font-size: 15px; | |
} | |
@media screen and (min-width: 480px) { | |
p { | |
font-size: 16px; | |
} | |
} | |
@media screen and (min-width: 700px) { | |
p { | |
font-size: 17px; | |
} | |
} | |
@media screen and (min-width: 900px) { | |
p { | |
font-size: 18px; | |
} | |
} | |
@media screen and (min-width: 1024px) { | |
p { | |
font-size: 19px; | |
} | |
} | |
@media screen and (min-width: 1440px) { | |
p { | |
font-size: 20px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment