mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
feat(renderer): body-class monospace toggle + CSS tokens
- useMonospaceClasses hook calls electronAPI.monospace.getSettings()
and toggles body.mono-{jetbrains-mono,fira-code} and
body.mono-ligatures-{on,off} classes
- Add --font-mono-active and --font-mono-feature tokens in globals.css
- Apply to code/pre/kbd/samp so all code rendering picks up the active
monospace font + ligature settings
This commit is contained in:
@@ -96,3 +96,22 @@
|
||||
.cm-editor .cm-scroller {
|
||||
@apply font-mono text-sm;
|
||||
}
|
||||
|
||||
/* Monospace font + ligature tokens — driven by body.mono-* classes */
|
||||
:root {
|
||||
--font-mono-active: 'JetBrains Mono', 'SF Mono', Monaco, 'Courier New', monospace;
|
||||
--font-mono-feature: 'liga' 0, 'calt' 0;
|
||||
}
|
||||
body.mono-fira-code {
|
||||
--font-mono-active: 'Fira Code', 'JetBrains Mono', 'SF Mono', monospace;
|
||||
}
|
||||
body.mono-ligatures-on {
|
||||
--font-mono-feature: 'liga' 1, 'calt' 1;
|
||||
}
|
||||
code,
|
||||
pre,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: var(--font-mono-active);
|
||||
font-feature-settings: var(--font-mono-feature);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user