Skip to content

Commit 6cf9f39

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 700. Added variables for the former two, as suggested by @ShGKme. Signed-off-by: kramo <git@kramo.page>
1 parent 961fa60 commit 6cf9f39

23 files changed

Lines changed: 38 additions & 29 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);
122123
}
123124

124125
.editingContainer {

src/assets/action.scss

Lines changed: 2 additions & 1 deletion
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);
5858
font-size: var(--default-font-size);
5959
line-height: var(--default-clickable-area);
6060

@@ -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);
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);
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);
221221
line-height: var(--default-clickable-area);
222222
223223
& > span {

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);
108108
}
109109
}
110110

src/components/NcAppSidebar/NcAppSidebarTabsButton.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,12 @@ defineProps<{
8888
}
8989
9090
.sidebarTabsButton__name {
91-
font-weight: normal;
91+
font-weight: var(--font-weight-element);
9292
overflow: hidden;
9393
text-overflow: ellipsis;
9494
text-wrap: nowrap;
9595
}
9696
97-
.sidebarTabsButton_selected .sidebarTabsButton__name {
98-
font-weight: bold;
99-
}
100-
10197
.sidebarTabsButton__icon {
10298
display: inline-flex;
10399
align-items: center;

src/components/NcAvatar/NcAvatar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ export default {
953953
display: block;
954954
width: 100%;
955955
text-align: center;
956-
font-weight: normal;
956+
font-weight: var(--font-weight-default);
957957
}
958958
}
959959

src/components/NcBreadcrumb/NcBreadcrumb.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,6 @@ export default {
324324
background-color: var(--color-background-dark);
325325
color: var(--color-main-text);
326326
}
327-
328-
&__text {
329-
font-weight: normal;
330-
}
331327
}
332328
:deep(.button-vue__text) {
333329
margin: 0;

src/components/NcButton/NcButton.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ td.row-size {
417417
}
418418

419419
.table-header {
420-
font-weight: normal;
420+
font-weight: var(--font-weight-default);
421421
color: var(--color-text-maxcontrast);
422422
}
423423

@@ -751,7 +751,7 @@ function onClick(event: MouseEvent) {
751751
transition-timing-function: linear;
752752
cursor: pointer;
753753
font-size: var(--default-font-size);
754-
font-weight: bold;
754+
font-weight: var(--font-weight-element);
755755
756756
// Setup different button sizes
757757
&--size-small {
@@ -847,7 +847,7 @@ function onClick(event: MouseEvent) {
847847
}
848848
849849
&__text {
850-
font-weight: bold;
850+
font-weight: var(--font-weight-element);
851851
margin-bottom: 1px;
852852
padding: 2px 0;
853853
white-space: nowrap;

src/components/NcCheckboxRadioSwitch/NcCheckboxContent.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ export default {
264264
&__description {
265265
display: block;
266266
color: var(--color-text-maxcontrast);
267+
font-weight: var(--font-weight-default);
267268
}
268269
269270
&--button-variant {

0 commit comments

Comments
 (0)