From fdd162a7b9d187cb4a88a372d87a8b08e2162ca0 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 19 May 2021 19:06:20 +1000 Subject: [PATCH] simplify previous patch The default 1 rem is fine, but we need to apply the default font size to the html element instead of the body for the definition of rem to update. Fixes #1174 --- qt/aqt/webview.py | 3 ++- ts/deckoptions/deckoptions-base.scss | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/qt/aqt/webview.py b/qt/aqt/webview.py index 7183e8677..34fb57fc2 100644 --- a/qt/aqt/webview.py +++ b/qt/aqt/webview.py @@ -443,7 +443,8 @@ div[contenteditable="true"]:focus { lang_dir = "ltr" return f""" -body {{ zoom: {zoom}; background: {background}; direction: {lang_dir}; {font} }} +body {{ zoom: {zoom}; background: {background}; direction: {lang_dir}; }} +html {{ {font} }} {button_style} :root {{ --window-bg: {background} }} :root[class*=night-mode] {{ --window-bg: {background} }} diff --git a/ts/deckoptions/deckoptions-base.scss b/ts/deckoptions/deckoptions-base.scss index 773075e44..79bdada4b 100644 --- a/ts/deckoptions/deckoptions-base.scss +++ b/ts/deckoptions/deckoptions-base.scss @@ -48,8 +48,3 @@ html { code { color: var(--flag1-bg); } - -// override the default form sizes -input.form-control, select.form-select { - font-size: inherit; -} \ No newline at end of file