font: override font size by default, font family is overridden by flag (#270)

This commit is contained in:
Huang Xin
2025-01-29 23:05:27 +01:00
committed by GitHub
parent 85c14002c6
commit 27c6ed402e
+2 -2
View File
@@ -30,9 +30,9 @@ const getFontStyles = (
--sans-serif: ${sansSerifFonts.map((font) => `"${font}"`).join(', ')}, sans-serif;
--monospace: ${monospaceFonts.map((font) => `"${font}"`).join(', ')}, monospace;
}
body {
html, body {
font-family: var(${defaultFont.toLowerCase() === 'serif' ? '--serif' : '--sans-serif'}) ${overrideFont ? '!important' : ''};
font-size: ${fontSize}px ${overrideFont ? '!important' : ''};
font-size: ${fontSize}px !important;
}
body * {
font-family: revert ${overrideFont ? '!important' : ''};