Remove hard-coded Python font sizes

This commit is contained in:
Matthias Metelka 2022-11-07 14:34:58 +01:00
parent e925f4b065
commit 861e0c75bd
3 changed files with 7 additions and 6 deletions

View file

@ -413,10 +413,10 @@ class AnkiWebView(QWebEngineView):
button_style = f""" button_style = f"""
button {{ font-family: {family}; }} button {{ font-family: {family}; }}
""" """
font = f"font-size:12px;font-family:{family};" font = f"font-family:{family};"
elif is_mac: elif is_mac:
family = "Helvetica" family = "Helvetica"
font = f'font-size:14px;font-family:"{family}";' font = f'font-family:"{family}";'
button_style = """ button_style = """
button { button {
--canvas: #fff; --canvas: #fff;
@ -432,7 +432,7 @@ button {
""" """
else: else:
family = self.font().family() family = self.font().family()
font = f'font-size:14px;font-family:"{family}", sans-serif;' font = f'font-family:"{family}", sans-serif;'
button_style = """ button_style = """
/* Buttons */ /* Buttons */
button{{ button{{

View file

@ -177,8 +177,8 @@ $vars: (
bg: ( bg: (
"Background color of primary button", "Background color of primary button",
( (
light: palette(blue, 4), light: palette(blue, 5),
dark: color.scale(palette(blue, 6), $saturation: -10%), dark: color.scale(palette(blue, 7), $saturation: -10%),
), ),
), ),
gradient: ( gradient: (

View file

@ -44,7 +44,8 @@ html {
} }
body { body {
--base-font-size: 13px; --base-font-size: 14px;
font-size: var(--base-font-size);
overscroll-behavior: none; overscroll-behavior: none;
&:not(.isMac), &:not(.isMac),
&:not(.isMac) * { &:not(.isMac) * {