From df672c2927e82a3ee632b0c9d669d533e89c2102 Mon Sep 17 00:00:00 2001 From: Said Achmiz Date: Tue, 11 Feb 2020 04:06:41 -0500 Subject: [PATCH] Fixed line spacing glitch --- assets/css/main.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index d904f11..0fce7c9 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -49,12 +49,17 @@ --deus-image-border-color: var(--deus-color-golden-brown); /* Typography. */ - --deus-content-base-font-size: 1.125rem; + /* 1rem = 16px (set on 'html'). + These calculated values ensure integer line height; + otherwise, line spacing will vary in pixel count, leading to + a subtly inconsistent appearance of the body text. + */ + --deus-content-base-font-size: calc(1rem * 9/8); --deus-body-font: HK Grotesk; --deus-body-font-weight: 300; --deus-body-text-shadow: none; - --deus-body-text-line-spacing: 1.4; + --deus-body-text-line-spacing: calc(1 + 7/(16 * 9/8)); --deus-body-text-paragraph-spacing: 1em; --deus-heading-font: Spectral SC;