Skip to content

Commit 835f48a

Browse files
authored
ui(commit message): switch font between mono and sans-serif (#9442)
1 parent c9608d1 commit 835f48a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

apps/desktop/src/components/CommitDetails.svelte

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import { writeClipboard } from '$lib/backend/clipboard';
33
import { type Commit, type UpstreamCommit } from '$lib/branches/v3';
4+
import { rewrapCommitMessage } from '$lib/config/uiFeatureFlags';
45
import { SETTINGS, type Settings } from '$lib/settings/userSettings';
56
import { UiState } from '$lib/state/uiState.svelte';
67
import { TestId } from '$lib/testing/testIds';
@@ -86,8 +87,11 @@
8687

8788
{#if description}
8889
<div
89-
class="text-13 description"
90+
class="description"
9091
class:expanded
92+
style:--commit-message-font={$rewrapCommitMessage
93+
? 'var(--fontfamily-default)'
94+
: 'var(--fontfamily-mono)'}
9195
bind:clientWidth={messageWidth}
9296
data-testid={TestId.CommitDrawerDescription}
9397
>
@@ -97,11 +101,7 @@
97101
{abbreviated}
98102
{/if}
99103
{#if isAbbrev}
100-
<button
101-
onclick={() => (expanded = !expanded)}
102-
type="button"
103-
class="readmore text-13 text-semibold"
104-
>
104+
<button onclick={() => (expanded = !expanded)} type="button" class="readmore text-bold">
105105
{#if expanded}
106106
less
107107
{:else}
@@ -140,8 +140,9 @@
140140
}
141141
142142
.description {
143+
font-size: 13px;
143144
line-height: var(--text-lineheight-body);
144-
font-family: var(--fontfamily-mono);
145+
font-family: var(--commit-message-font);
145146
white-space: pre-line;
146147
}
147148

0 commit comments

Comments
 (0)