1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Remove em font-size from html (breaks rem if font-size is different than 16)

This commit is contained in:
Antoine Boulanger
2018-04-09 10:45:19 -04:00
parent 84a60a7670
commit b7813ea21b
2 changed files with 9 additions and 10 deletions

View File

@@ -6,8 +6,7 @@
// Simple page-level setup.
//
// 1. Set the default `font-size` and `line-height` for the entire project,
// sourced from our default variables. The `font-size` is calculated to exist
// in ems, the `line-height` is calculated to exist unitlessly.
// sourced from our default variables.
// 2. Force scrollbars to always be visible to prevent awkward jumps when
// navigating between pages that do/do not have enough content to produce
// scrollbars naturally.
@@ -21,31 +20,31 @@ html {
line-height: $line-height; /* [1] */
@media (max-width: $to-small) {
font-size: em(12px);
font-size: 12px;
}
@media (min-width: $from-small) and (max-width: $to-medium) {
font-size: em(13px);
font-size: 13px;
}
@media (min-width: $from-medium) and (max-width: $to-large) {
font-size: em(14px);
font-size: 14px;
}
@media (min-width: $from-large) and (max-width: $to-huge) {
font-size: em($font-size); /* [1] */
font-size: $font-size; /* [1] */
}
@media (min-width: $from-huge) and (max-width: $to-gigantic) {
font-size: em(18px);
font-size: 18px;
}
@media (min-width: $from-gigantic) and (max-width: $to-colossal) {
font-size: em(21px);
font-size: 21px;
}
@media (min-width: $from-colossal) {
font-size: em(24px);
font-size: 24px;
}
}

View File

@@ -2,7 +2,7 @@
// Tools / Font Faces
// ==========================================================================
$global-font-file-formats: "woff", "ttf" !default;
$global-font-file-formats: "woff2", "woff" !default;
//
// Builds the `src` list for an `@font-face` declaration.