allow changing the font-family

This commit is contained in:
Bruno Windels 2020-06-23 17:53:16 +02:00
parent 86597aabca
commit e083856801
2 changed files with 11 additions and 0 deletions

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
$font-family: var(--font-family, $font-family);
$monospace-font-family: var(--font-family-monospace, $monospace-font-family);
// //
// --accent-color // --accent-color
$accent-color: var(--accent-color); $accent-color: var(--accent-color);

View File

@ -60,6 +60,15 @@ function setCustomThemeVars(customTheme) {
} }
} }
} }
if (customTheme.fonts) {
const {fonts} = customTheme;
if (fonts.general) {
style.setProperty("--font-family", fonts.general);
}
if (fonts.monospace) {
style.setProperty("--font-family-monospace", fonts.monospace);
}
}
} }
export function getCustomTheme(themeName) { export function getCustomTheme(themeName) {