Feat: update line height

Since we have different font sizes, we should make the line height
dependent on the font size and not a fixed value. The recommended
value for accessibility is 1.5.
https://www.w3.org/WAI/WCAG21/Understanding/text-spacing.html

Signed-off-by: Marco Ambrosini <marcoambrosini@proton.me>
pull/46876/head
Marco Ambrosini 1 year ago
parent 21f558b12b
commit e537728dd1
  1. 2
      apps/theming/css/default.css
  2. 2
      apps/theming/lib/Themes/DefaultTheme.php

@ -50,7 +50,7 @@
--font-face: system-ui, -apple-system, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, Ubuntu, 'Helvetica Neue', 'Noto Sans', 'Liberation Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--default-font-size: 15px;
/* 1.5 x font-size for accessibility */
--default-line-height: 24px;
--default-line-height: 1.5;
--animation-quick: 100ms;
--animation-slow: 300ms;
/** Border width for input elements such as text fields and selects */

@ -161,7 +161,7 @@ class DefaultTheme implements ITheme {
'--font-face' => "system-ui, -apple-system, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, Ubuntu, 'Helvetica Neue', 'Noto Sans', 'Liberation Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",
'--default-font-size' => '15px',
// 1.5 * font-size for accessibility
'--default-line-height' => '24px',
'--default-line-height' => '1.5',
// TODO: support "(prefers-reduced-motion)"
'--animation-quick' => '100ms',

Loading…
Cancel
Save