From 3d04f7dbda48eba9ceebd4144e28301f665eb1aa Mon Sep 17 00:00:00 2001 From: Karl Stolley Date: Thu, 30 May 2024 10:38:19 -0500 Subject: [PATCH] info_density: Set a minimum line-height on body. --- web/styles/app_variables.css | 3 +++ web/styles/zulip.css | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css index ad13f73f64..769224f4ec 100644 --- a/web/styles/app_variables.css +++ b/web/styles/app_variables.css @@ -72,6 +72,9 @@ var(--markdown-interelement-space-px) * 2 ); + /* Legacy values */ + --legacy-body-line-height-unitless: calc(20 / 14); + .more-dense-mode { /* The legacy values here are not altered by JavaScript */ --base-font-size-px: 14px; diff --git a/web/styles/zulip.css b/web/styles/zulip.css index 9f87008503..a025068680 100644 --- a/web/styles/zulip.css +++ b/web/styles/zulip.css @@ -24,7 +24,13 @@ body { margin: 0; padding: 0; font-size: 14px; - line-height: calc(20 / 14); + /* The line-height used in most of the UI should be at least + its legacy value, but should expand with larger base + line-height values. */ + line-height: max( + var(--legacy-body-line-height-unitless), + var(--base-line-height-unitless) + ); font-family: "Source Sans 3 VF", sans-serif; color: var(--color-text-default); background-color: var(--color-background);