update font styling loop

This commit is contained in:
Emir 2020-12-06 01:36:47 +03:00 committed by GitHub
parent b07e9863f5
commit aab6b83eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,17 +63,9 @@ module.exports = {
for (let style of ['sans', 'serif', 'mono', 'code', 'quote', 'headings']) { for (let style of ['sans', 'serif', 'mono', 'code', 'quote', 'headings']) {
if (!store()[style]) continue; if (!store()[style]) continue;
if (style == 'headings') { document
for (let heading of ['heading1', 'heading2', 'heading3']) { .querySelector('.notion-app-inner')
document .style.setProperty(`--theme--font_${style}`, store()[style]);
.querySelector('.notion-app-inner')
.style.setProperty(`--theme--font_${heading}`, store()[style]);
}
} else {
document
.querySelector('.notion-app-inner')
.style.setProperty(`--theme--font_${style}`, store()[style]);
}
} }
} }
}, },