correction sans-serif default
This commit is contained in:
parent
bc2317ab69
commit
89e5fe6612
2 changed files with 4 additions and 3 deletions
|
|
@ -481,7 +481,6 @@ input[type=number] {
|
|||
|
||||
.settings-subsection {
|
||||
padding: var(--space-xs) 0;
|
||||
padding-left: 30px;
|
||||
}
|
||||
.settings-subsection h3 {
|
||||
margin-top: calc(var(--space-xs) * 1.5);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ const textDefaults = useTextDefaults();
|
|||
const { fonts: projectFonts, loadFont, loadAllFontPreviews } = useProjectFonts();
|
||||
|
||||
// State — initial values match stylesheet.print.css (overwritten by syncFromStore)
|
||||
const font = ref('DM Sans');
|
||||
const font = ref('sans-serif');
|
||||
const fontSize = ref({ value: 14, unit: 'px' });
|
||||
const lineHeight = ref({ value: 18, unit: 'px' });
|
||||
const color = ref('rgb(0, 0, 0)');
|
||||
|
|
@ -141,10 +141,12 @@ const syncFromStore = () => {
|
|||
color.value = textDefaults.color;
|
||||
} else {
|
||||
// First mount — read from CSS store
|
||||
// For font-family, only accept known project fonts (ignore baseCss fonts like "DM Sans")
|
||||
const fontVal = extractValue('body', 'font-family');
|
||||
if (fontVal) {
|
||||
const cleaned = fontVal.replace(/['"]/g, '').trim();
|
||||
font.value = cleaned || 'sans-serif';
|
||||
const isKnownFont = cleaned === 'sans-serif' || projectFonts.some(f => f.name === cleaned);
|
||||
font.value = isKnownFont ? cleaned : 'sans-serif';
|
||||
}
|
||||
|
||||
const colorVal = extractValue('body', 'color');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue