maps for font-sizes
This commit is contained in:
parent
2862bbff9c
commit
e5f4647542
4 changed files with 39 additions and 39 deletions
|
@ -437,7 +437,7 @@ h2, .h2-like {
|
|||
|
||||
@media (min-width: 576px) {
|
||||
h2, .h2-like {
|
||||
font-size: 2.8rem;
|
||||
font-size: 3.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,29 +1,13 @@
|
|||
// font-size Mixin
|
||||
// compiles to font-size-s + font-size-base on small-plus devices
|
||||
// compiles to font-size mobile + font-size desktop on small-plus devices
|
||||
// ex. h2 { @include font-size(h2);}
|
||||
$font-sizes: (
|
||||
base-size : $font-size-base,
|
||||
base-size-s: $font-size-s,
|
||||
h1-size : $h1-size,
|
||||
h1-size-s : $h1-size-s,
|
||||
h2-size : $h2-size,
|
||||
h2-size-s : $h2-size-s,
|
||||
h3-size : $h3-size,
|
||||
h3-size-s : $h3-size-s,
|
||||
h4-size : $h4-size,
|
||||
h4-size-s : $h4-size-s,
|
||||
h5-size : $h5-size,
|
||||
h5-size-s : $h5-size-s,
|
||||
h6-size : $h6-size,
|
||||
h6-size-s : $h6-size-s
|
||||
) !default;
|
||||
|
||||
@mixin font-size($elem) {
|
||||
$base-size: #{$elem}-size;
|
||||
$small-size: #{$elem}-size-s;
|
||||
font-size: map-get($font-sizes, $small-size);
|
||||
$q: map-get($font-sizes, $elem);
|
||||
$mob: map-get($q, "mobile");
|
||||
$desk: map-get($q, "desktop");
|
||||
font-size: $mob;
|
||||
@include respond-to("small-up") {
|
||||
font-size: map-get($font-sizes, $base-size);
|
||||
font-size: $desk;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,22 +15,38 @@ $font-family-headings : sans-serif; // font for h1, h2.. h6
|
|||
$font-family-monospace : consolas, courier, monospace; // font for code and samples
|
||||
|
||||
// font sizes (1.6rem value is "16px" equivalent)
|
||||
$font-size-base : 1.6rem !default;
|
||||
$h1-size : 3.2rem !default;
|
||||
$h2-size : 2.8rem !default;
|
||||
$h3-size : 2.4rem !default;
|
||||
$h4-size : 2.0rem !default;
|
||||
$h5-size : 1.8rem !default;
|
||||
$h6-size : 1.6rem !default;
|
||||
$font-size-base : 1.6rem;
|
||||
|
||||
// alternate font sizes
|
||||
$font-size-s : 1.4rem !default;
|
||||
$h1-size-s : 2.8rem !default;
|
||||
$h2-size-s : 2.4rem !default;
|
||||
$h3-size-s : 2.0rem !default;
|
||||
$h4-size-s : 1.8rem !default;
|
||||
$h5-size-s : 1.6rem !default;
|
||||
$h6-size-s : 1.4rem !default;
|
||||
$font-sizes: (
|
||||
base: (
|
||||
mobile : 1.4rem,
|
||||
desktop : $font-size-base
|
||||
),
|
||||
h1: (
|
||||
mobile : 2.8rem,
|
||||
desktop : 3.2rem
|
||||
),
|
||||
h2: (
|
||||
mobile : 2.4rem,
|
||||
desktop : 3.8rem
|
||||
),
|
||||
h3: (
|
||||
mobile : 2.0rem,
|
||||
desktop : 2.4rem
|
||||
),
|
||||
h4: (
|
||||
mobile : 1.8rem,
|
||||
desktop : 2.0rem
|
||||
),
|
||||
h5: (
|
||||
mobile : 1.6rem,
|
||||
desktop : 1.8rem
|
||||
),
|
||||
h6: (
|
||||
mobile : 1.4rem,
|
||||
desktop : 1.6rem
|
||||
)
|
||||
) !default;
|
||||
|
||||
// line heights
|
||||
$line-height-s : 1.3 !default;
|
||||
|
|
Loading…
Reference in a new issue