diff --git a/theme.py b/theme.py index 6fd7480d0..20e3b1ef9 100644 --- a/theme.py +++ b/theme.py @@ -160,6 +160,14 @@ def setCSSparam(css: str, param: str, value: str) -> str: s = css.split(searchStr) newcss = '' for sectionStr in s: + # handle font-family which is a variable + nextSection = sectionStr + if ';' in nextSection: + nextSection = nextSection.split(';')[0] + ';' + if searchStr == 'font-family:' and "var(--" in nextSection: + newcss += searchStr + ' ' + sectionStr + continue + if not newcss: if sectionStr: newcss = sectionStr