Skip to content

Commit ef48306

Browse files
committed
feat(theming): Introduce font weight variables
Counterpart of nextcloud-libraries/nextcloud-vue#8469 Signed-off-by: kramo <git@kramo.page>
1 parent dfa407c commit ef48306

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

apps/theming/css/default.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@
7070
--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';
7171
--default-font-size: 15px;
7272
--font-size-small: 13px;
73+
/* Default text font weight */
74+
--font-weight-default: 400;
75+
/* Font weight for interactive elements */
76+
--font-weight-element: 500;
77+
/* Weight for titles and headings */
78+
--font-weight-heading: 700;
7379
/* 1.5 x font-size for accessibility */
7480
--default-line-height: 1.5;
7581
--animation-quick: 100ms;

apps/theming/lib/Themes/DefaultTheme.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ public function getCSSVariables(): array {
194194
'--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'",
195195
'--default-font-size' => '15px',
196196
'--font-size-small' => '13px',
197+
// Default text font weight
198+
'--font-weight-default' => '400',
199+
// Font weight for interactive elements
200+
'--font-weight-element' => '500',
201+
// Weight for titles and headings
202+
'--font-weight-heading' => '700',
197203
// 1.5 * font-size for accessibility
198204
'--default-line-height' => '1.5',
199205

0 commit comments

Comments
 (0)