Skip to content

Commit abfb8e7

Browse files
committed
[stable8] feat: Semantic font weights for interactive elements
Signed-off-by: kramo <git@kramo.page>
1 parent 23fa873 commit abfb8e7

36 files changed

Lines changed: 54 additions & 45 deletions

File tree

src/assets/NcAppNavigationItem.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
padding: 0;
135135
white-space: nowrap;
136136
color: var(--color-main-text);
137-
font-weight: 500;
137+
font-weight: var(--font-weight-element, 500);
138138
background-repeat: no-repeat;
139139
background-position: $icon-margin center;
140140
background-size: $icon-size $icon-size;
@@ -157,6 +157,7 @@
157157
max-width: 100%;
158158
white-space: nowrap;
159159
text-overflow: ellipsis;
160+
font-weight: var(--font-weight-element, normal);
160161
}
161162

162163
.editingContainer {

src/assets/action.scss

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

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

@@ -106,7 +106,7 @@
106106
}
107107

108108
&__name {
109-
font-weight: bold;
109+
font-weight: var(--font-weight-heading, bold);
110110
text-overflow: ellipsis;
111111
overflow: hidden;
112112
white-space: nowrap;
@@ -118,6 +118,7 @@
118118
display: block;
119119
white-space: pre-wrap;
120120
font-size: var(--font-size-small);
121+
font-weight: var(--font-weight-default, normal);
121122
line-height: var(--default-line-height);
122123
color: var(--color-text-maxcontrast);
123124
cursor: pointer;

src/components/NcActionInput/NcActionInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ $input-margin: 4px;
591591
background-color: transparent;
592592
box-shadow: none;
593593
594-
font-weight: normal;
594+
font-weight: var(--font-weight-default, normal);
595595
596596
&__icon-wrapper {
597597
display: flex;

src/components/NcActionTextEditable/NcActionTextEditable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ $input-margin: 4px;
252252
background-color: transparent;
253253
box-shadow: none;
254254
255-
font-weight: normal;
255+
font-weight: var(--font-weight-default, normal);
256256
line-height: var(--default-clickable-area);
257257
258258
& > 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
@@ -114,7 +114,7 @@ export default {
114114
padding-inline: 0 calc((var(--default-clickable-area) - 16px) / 2) !important;
115115
116116
:deep(.button-vue__text) {
117-
font-weight: normal !important;
117+
font-weight: var(--font-weight-default, normal) !important;
118118
}
119119
}
120120
}

src/components/NcAppSettingsDialog/NcAppSettingsDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ $content-inset: calc(3 * var(--default-grid-baseline));
295295
padding: $content-inset;
296296
margin: 0;
297297
font-size: 20px;
298-
font-weight: 700;
298+
font-weight: var(--font-weight-heading, 700);
299299
}
300300
301301
:deep(.app-settings__navigation) {
@@ -329,7 +329,7 @@ $content-inset: calc(3 * var(--default-grid-baseline));
329329
display: flex;
330330
align-items: center;
331331
font-size: var(--default-font-size);
332-
font-weight: 500;
332+
font-weight: var(--font-weight-element, 500);
333333
height: var(--default-clickable-area);
334334
margin: 2px 0;
335335
line-height: var(--default-clickable-area);

src/components/NcAppSettingsSection/NcAppSettingsSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ onBeforeUnmount(() => {
8383
padding-inline: var(--app-settings-section-text-offset);
8484
padding-block: 0;
8585
font-size: 20px;
86-
font-weight: bold;
86+
font-weight: var(--font-weight-heading, bold);
8787
}
8888
8989
&__description {

src/components/NcAppSidebar/NcAppSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ $top-buttons-spacing: $app-navigation-padding; // align with app navigation
15391539
margin: 0;
15401540
padding: $desc-input-padding;
15411541
font-size: 20px;
1542-
font-weight: bold;
1542+
font-weight: var(--font-weight-heading, bold);
15431543
}
15441544
}
15451545

src/components/NcAssistantButton/NcAssistantButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
}
7777

7878
h5 {
79-
font-weight: bold;
79+
font-weight: var(--font-weight-heading, bold);
8080
margin: 40px 0 20px 0;
8181
}
8282

0 commit comments

Comments
 (0)