mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
Merge pull request #74772 from NousResearch/bb/code-pre-padding
fix(desktop): tighten code-block padding and use the native mono font
This commit is contained in:
commit
3735ccee23
2 changed files with 14 additions and 8 deletions
|
|
@ -386,12 +386,12 @@
|
|||
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', emoji;
|
||||
/* Key caps always use the native UI face — never theme typography overrides. */
|
||||
--dt-font-kbd: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
|
||||
/* JetBrains Mono first — the face we bundle (@font-face above) and the
|
||||
terminal's primary — so code/diff match the terminal on every platform
|
||||
instead of drifting to a system Cascadia Code where it's installed. */
|
||||
/* Menlo/Monaco first — Apple's native monospace faces — so code/diff read
|
||||
in the system mono on macOS, with SF Mono and bundled Courier Prime as
|
||||
fallbacks. */
|
||||
--dt-font-mono:
|
||||
'JetBrains Mono', 'Cascadia Code', 'SF Mono', ui-monospace, Menlo, Consolas, monospace, 'Apple Color Emoji',
|
||||
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', emoji;
|
||||
Menlo, Monaco, 'SF Mono', 'Courier Prime', monospace, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||
'Noto Color Emoji', emoji;
|
||||
--dt-base-size: 1rem;
|
||||
--dt-line-height: 1.5;
|
||||
--dt-letter-spacing: 0;
|
||||
|
|
@ -1549,6 +1549,13 @@ text-* variant utilities. */ .btn-arc {
|
|||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/* react-shiki nests its own `pre.shiki` inside our `.aui-shiki` Pre, so the
|
||||
code card's `[&_pre]` padding lands on both and doubles the inset. The outer
|
||||
Pre already carries the card's padding — zero the inner one. */
|
||||
[data-slot='aui_assistant-message-content'] .aui-md .aui-shiki .shiki {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
[data-slot='aui_assistant-message-content'] .aui-md .aui-md-table {
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ const SYSTEM_SANS =
|
|||
'"Segoe WPC", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif, ' +
|
||||
EMOJI_FALLBACK
|
||||
|
||||
const SYSTEM_MONO =
|
||||
'"Cascadia Code", "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace, ' + EMOJI_FALLBACK
|
||||
const SYSTEM_MONO = 'Menlo, Monaco, "SF Mono", "Courier Prime", monospace, ' + EMOJI_FALLBACK
|
||||
|
||||
export const DEFAULT_TYPOGRAPHY: DesktopThemeTypography = { fontSans: SYSTEM_SANS, fontMono: SYSTEM_MONO }
|
||||
|
||||
|
|
@ -92,7 +91,7 @@ export const nousTheme: DesktopTheme = {
|
|||
},
|
||||
typography: {
|
||||
fontSans: SYSTEM_SANS,
|
||||
fontMono: `"Courier Prime", ${SYSTEM_MONO}`,
|
||||
fontMono: SYSTEM_MONO,
|
||||
fontUrl: 'https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue