From 8f2e2878e576e824bce8f477f669ce78b158ede8 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 22 Aug 2023 18:19:15 +0800 Subject: [PATCH] Use line-height: normal by default (#26635) Fix #26537 again because 1.15 is too small for some fonts. --- web_src/css/base.css | 6 +----- web_src/css/modules/normalize.css | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/web_src/css/base.css b/web_src/css/base.css index 78609ab0de..d9c57932fc 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -10,7 +10,7 @@ --font-weight-semibold: 600; --font-weight-bold: 700; /* line-height: use the default value as "modules/normalize.css" */ - --line-height-default: 1.15; + --line-height-default: normal; /* backgrounds */ --checkbox-mask-checked: url('data:image/svg+xml;utf8,'); --checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,'); @@ -521,8 +521,6 @@ a.label, color: var(--color-text); user-select: auto; line-height: var(--line-height-default); /* fomantic uses "1" which causes overflow problems because "1" doesn't consider the descent part */ - padding-top: 11px; /* counteract line-height change */ - padding-bottom: 11px; /* counteract line-height change */ } .ui.menu .item > .svg { @@ -669,8 +667,6 @@ a.label, .ui.secondary.menu .item { margin-left: 0; margin-right: 0; - padding-top: 10px; /* counteract line-height change */ - padding-bottom: 10px; /* counteract line-height change */ } .ui.secondary.menu .dropdown.item:hover, diff --git a/web_src/css/modules/normalize.css b/web_src/css/modules/normalize.css index 809ed3d7cc..63fb04a577 100644 --- a/web_src/css/modules/normalize.css +++ b/web_src/css/modules/normalize.css @@ -25,7 +25,7 @@ Use a better box model (opinionated). } html { - line-height: 1.15; /* 1. Correct the line height in all browsers. */ + line-height: normal; /* 1. (not following the "modern-normalize") Do not change the browser's default line-height, the default value is font-dependent and roughly 1.2 */ -webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */ }