tweak font
This commit is contained in:
parent
94e9e84753
commit
50e306fd7c
1 changed files with 8 additions and 6 deletions
|
@ -22,10 +22,12 @@ export interface Theme {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
; const DEFAULT_SANS_SERIF =
|
// const DEFAULT_SANS_SERIF = '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'
|
||||||
'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'
|
//const DEFAULT_MONO = "ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace"
|
||||||
const DEFAULT_MONO = "ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace"
|
|
||||||
|
|
||||||
|
const DEFAULT_SANS_SERIF = '"Helvetica Neue", "BIZ UDPGothic", "Helvetica", "Noto Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Arial", "Yu Gothic", "Meiryo", sans-serif'
|
||||||
|
const DEFAULT_MONO = '"Inconsolata", "Noto Mono", monospace'
|
||||||
|
const DEFAULT_SERIF = '"Times New Roman", "BIZ UDPMincho", "Noto Serif", "YuMincho", "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif'
|
||||||
export function googleFontHref(theme: Theme) {
|
export function googleFontHref(theme: Theme) {
|
||||||
const { code, header, body } = theme.typography
|
const { code, header, body } = theme.typography
|
||||||
return `https://fonts.googleapis.com/css2?family=${code}&family=${header}:wght@400;700&family=${body}:ital,wght@0,400;0,600;1,400;1,600&display=swap`
|
return `https://fonts.googleapis.com/css2?family=${code}&family=${header}:wght@400;700&family=${body}:ital,wght@0,400;0,600;1,400;1,600&display=swap`
|
||||||
|
@ -45,9 +47,9 @@ ${stylesheet.join("\n\n")}
|
||||||
--tertiary: ${theme.colors.lightMode.tertiary};
|
--tertiary: ${theme.colors.lightMode.tertiary};
|
||||||
--highlight: ${theme.colors.lightMode.highlight};
|
--highlight: ${theme.colors.lightMode.highlight};
|
||||||
|
|
||||||
--headerFont: "${theme.typography.header}", ${DEFAULT_SANS_SERIF};
|
--headerFont: ${DEFAULT_SANS_SERIF};
|
||||||
--bodyFont: "${theme.typography.body}", ${DEFAULT_SANS_SERIF};
|
--bodyFont: ${DEFAULT_SERIF};
|
||||||
--codeFont: "${theme.typography.code}", ${DEFAULT_MONO};
|
--codeFont: ${DEFAULT_MONO};
|
||||||
}
|
}
|
||||||
|
|
||||||
:root[saved-theme="dark"] {
|
:root[saved-theme="dark"] {
|
||||||
|
|
Loading…
Reference in a new issue