Skip to content

Commit 26567e9

Browse files
committed
feat: Semantic font weights for interactive elements
Resolves #8083 All general text should now be weight 400, interactive controls 500, and headings 600. Also added variables, as suggested by @ShGKme. Signed-off-by: kramo <git@kramo.page>
1 parent 961fa60 commit 26567e9

37 files changed

Lines changed: 54 additions & 45 deletions

File tree

src/assets/NcAppNavigationItem.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
max-width: 100%;
120120
white-space: nowrap;
121121
text-overflow: ellipsis;
122+
font-weight: var(--font-weight-element, normal);
122123
}
123124

124125
.editingContainer {

src/assets/action.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
background-color: transparent;
5555
box-shadow: none;
5656

57-
font-weight: normal;
57+
font-weight: var(--font-weight-element, normal);
5858
font-size: var(--default-font-size);
5959
line-height: var(--default-clickable-area);
6060

@@ -105,7 +105,7 @@
105105
}
106106

107107
&__name {
108-
font-weight: bold;
108+
font-weight: var(--font-weight-heading, bold);
109109
text-overflow: ellipsis;
110110
overflow: hidden;
111111
white-space: nowrap;
@@ -117,6 +117,7 @@
117117
display: block;
118118
white-space: pre-wrap;
119119
font-size: var(--font-size-small);
120+
font-weight: var(--font-weight-default, normal);
120121
line-height: var(--default-line-height);
121122
color: var(--color-text-maxcontrast);
122123
cursor: pointer;

src/components/NcActionInput/NcActionInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ $input-margin: 4px;
531531
background-color: transparent;
532532
box-shadow: none;
533533
534-
font-weight: normal;
534+
font-weight: var(--font-weight-default, normal);
535535
536536
&__icon-wrapper {
537537
display: flex;

src/components/NcActionTextEditable/NcActionTextEditable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ $input-margin: 4px;
217217
background-color: transparent;
218218
box-shadow: none;
219219
220-
font-weight: normal;
220+
font-weight: var(--font-weight-default, normal);
221221
line-height: var(--default-clickable-area);
222222
223223
& > span {

src/components/NcAppNavigationCaption/NcAppNavigationCaption.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export default {
266266
}
267267
268268
&__name {
269-
font-weight: bold;
269+
font-weight: var(--font-weight-heading, bold);
270270
color: var(--color-main-text);
271271
font-size: var(--default-font-size);
272272
line-height: var(--default-clickable-area);

src/components/NcAppNavigationSettings/NcAppNavigationSettings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ onClickOutside(container, () => {
104104
padding-inline: 0 calc((var(--default-clickable-area) - 16px) / 2) !important;
105105
106106
:global(.button-vue__text) {
107-
font-weight: normal;
107+
font-weight: var(--font-weight-default, normal);
108108
}
109109
}
110110

src/components/NcAppSettingsDialog/NcAppSettingsDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function unregisterSection(id: string) {
285285
margin: 4px 0;
286286
line-height: var(--default-clickable-area);
287287
border-radius: var(--border-radius-element);
288-
font-weight: bold;
288+
font-weight: var(--font-weight-element, bold);
289289
padding: 0 calc(4 * var(--default-grid-baseline));
290290
cursor: pointer;
291291
white-space: nowrap;

src/components/NcAppSettingsSection/NcAppSettingsSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ onBeforeUnmount(() => {
8888
padding-inline: var(--app-settings-section-text-offset);
8989
padding-block: 0;
9090
font-size: 20px;
91-
font-weight: bold;
91+
font-weight: var(--font-weight-heading, bold);
9292
}
9393
9494
&__description {

src/components/NcAppSidebar/NcAppSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ $desc-height: $desc-name-height + $desc-subname-height;
17311731
margin: 0;
17321732
padding: $desc-input-padding;
17331733
font-size: 20px;
1734-
font-weight: bold;
1734+
font-weight: var(--font-weight-heading, bold);
17351735
}
17361736
}
17371737

src/components/NcAppSidebar/NcAppSidebarTabsButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ defineProps<{
8888
}
8989
9090
.sidebarTabsButton__name {
91-
font-weight: normal;
91+
font-weight: var(--font-weight-element, normal);
9292
overflow: hidden;
9393
text-overflow: ellipsis;
9494
text-wrap: nowrap;
9595
}
9696
9797
.sidebarTabsButton_selected .sidebarTabsButton__name {
98-
font-weight: bold;
98+
font-weight: var(--font-weight-element, bold);
9999
}
100100
101101
.sidebarTabsButton__icon {

0 commit comments

Comments
 (0)