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)
|
s = css.split(searchStr)
|
||||||
newcss = ''
|
newcss = ''
|
||||||
for sectionStr in s:
|
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 not newcss:
|
||||||
if sectionStr:
|
if sectionStr:
|
||||||
newcss = sectionStr
|
newcss = sectionStr
|
||||||
|
|
Loading…
Reference in New Issue