Skip to content

Commit 3b6dd9d

Browse files
allozaurrsenthilkumar6
authored andcommitted
ui: Centralize monospace font styles in app.css (ggml-org#23272)
1 parent cb9e04e commit 3b6dd9d

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

tools/ui/src/app.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
--sidebar-ring: oklch(0.708 0 0);
4141
--code-background: oklch(0.985 0 0);
4242
--code-foreground: oklch(0.145 0 0);
43+
--font-mono:
44+
ui-monospace, SFMono-Regular, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
45+
'Liberation Mono', Menlo, monospace;
4346
--layer-popover: 1000000;
4447

4548
--chat-form-area-height: 8rem;
@@ -172,6 +175,10 @@
172175
*::-webkit-scrollbar-thumb:hover {
173176
background: hsl(var(--muted-foreground) / 0.5);
174177
}
178+
179+
:where(code, pre, kbd, samp) {
180+
font-family: var(--font-mono);
181+
}
175182
}
176183

177184
@layer utilities {

tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageAssistant/ChatMessageAssistant.svelte

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,6 @@
379379
border-radius: 1rem;
380380
background: hsl(var(--muted) / 0.3);
381381
color: var(--foreground);
382-
font-family:
383-
ui-monospace, SFMono-Regular, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
384-
'Liberation Mono', Menlo, monospace;
385382
font-size: 0.875rem;
386383
line-height: 1.6;
387384
white-space: pre-wrap;

tools/ui/src/lib/components/app/content/MarkdownContent/MarkdownContent.svelte

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,6 @@
742742
padding: 0.125rem 0.375rem;
743743
border-radius: 0.375rem;
744744
font-size: 0.875rem;
745-
font-family:
746-
ui-monospace, SFMono-Regular, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
747-
'Liberation Mono', Menlo, monospace;
748745
}
749746
750747
div :global(pre) {

tools/ui/src/lib/components/app/content/SyntaxHighlightedCode.svelte

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@
8080
</div>
8181

8282
<style>
83-
.code-preview-wrapper {
84-
font-family:
85-
ui-monospace, SFMono-Regular, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas,
86-
'Liberation Mono', Menlo, monospace;
87-
}
88-
8983
.code-preview-wrapper pre {
9084
background: transparent;
9185
}

0 commit comments

Comments
 (0)