forked from indymedia/epicyon
Handle font family which is a variable
parent
a0a462fe05
commit
60212ceb06
8
theme.py
8
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
|
||||
|
|
Loading…
Reference in New Issue