Skip to content

Instantly share code, notes, and snippets.

@airen
Created June 27, 2015 08:44
Show Gist options
  • Save airen/3318a8752424e31ce419 to your computer and use it in GitHub Desktop.
Save airen/3318a8752424e31ce419 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$p-font-sizes: (
null : 15px,
480px : 16px,
640px : 17px,
1024px: 19px
);
$h1-font-sizes: (
null : 28px,
480px : 31px,
640px : 33px,
1024px: 36px
);
@mixin font-size($fs-map) {
@each $fs-breakpoint, $fs-font-size in $fs-map {
@if $fs-breakpoint == null {
font-size: $fs-font-size;
}
@else {
@media screen and (min-width: $fs-breakpoint) {
font-size: $fs-font-size;
}
}
}
}
h1 {
@include font-size($h1-font-sizes);
}
p, ul, ol {
@include font-size($p-font-sizes);
}
h1 {
font-size: 28px;
}
@media screen and (min-width: 480px) {
h1 {
font-size: 31px;
}
}
@media screen and (min-width: 640px) {
h1 {
font-size: 33px;
}
}
@media screen and (min-width: 1024px) {
h1 {
font-size: 36px;
}
}
p, ul, ol {
font-size: 15px;
}
@media screen and (min-width: 480px) {
p, ul, ol {
font-size: 16px;
}
}
@media screen and (min-width: 640px) {
p, ul, ol {
font-size: 17px;
}
}
@media screen and (min-width: 1024px) {
p, ul, ol {
font-size: 19px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment