From 068f359dc2de88c1dbdf5df742f8660df9639999 Mon Sep 17 00:00:00 2001 From: kramo Date: Fri, 24 Apr 2026 16:03:52 +0200 Subject: [PATCH] feat(theming): Introduce font weight variables Counterpart of https://github.com/nextcloud-libraries/nextcloud-vue/pull/8469 Signed-off-by: kramo --- apps/theming/css/default.css | 6 ++++++ apps/theming/lib/Themes/DefaultTheme.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css index 39eb9391009eb..7e66c54449f2c 100644 --- a/apps/theming/css/default.css +++ b/apps/theming/css/default.css @@ -70,6 +70,12 @@ --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; --font-size-small: 13px; + /* Default text font weight */ + --font-weight-default: 400; + /* Font weight for interactive elements */ + --font-weight-element: 500; + /* Weight for titles and headings */ + --font-weight-heading: 600; /* 1.5 x font-size for accessibility */ --default-line-height: 1.5; --animation-quick: 100ms; diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 02ab6475e1bab..e30dae42a9432 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -194,6 +194,12 @@ public function getCSSVariables(): array { '--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', '--font-size-small' => '13px', + // Default text font weight + '--font-weight-default' => '400', + // Font weight for interactive elements + '--font-weight-element' => '500', + // Weight for titles and headings + '--font-weight-heading' => '600', // 1.5 * font-size for accessibility '--default-line-height' => '1.5',