From bc1d3964840ba8cdddeaa263c6b83808b3f644ad Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 5 Dec 2021 20:32:11 +0000 Subject: [PATCH] Include more colors in theme designer --- webapp_themeDesigner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp_themeDesigner.py b/webapp_themeDesigner.py index b2be20a9e..e443e1af4 100644 --- a/webapp_themeDesigner.py +++ b/webapp_themeDesigner.py @@ -243,7 +243,7 @@ def htmlThemeDesigner(cssCache: {}, baseDir: str, '

\n' - elif (variableName.endswith('-color') or + elif ('-color' in variableName or variableName.endswith('-text')): # only use colors defined as hex if not value.startswith('#'): @@ -252,11 +252,11 @@ def htmlThemeDesigner(cssCache: {}, baseDir: str, else: continue variableNameStr = variableName.replace('-', ' ') - if variableNameStr.endswith(' color'): + if ' color' in variableNameStr: variableNameStr = variableNameStr.replace(' color', '') - if variableNameStr.endswith(' bg'): + if ' bg' in variableNameStr: variableNameStr = variableNameStr.replace(' bg', ' background') - elif variableNameStr.endswith(' fg'): + elif ' fg' in variableNameStr: variableNameStr = variableNameStr.replace(' fg', ' foreground') if variableNameStr == 'cw': variableNameStr = 'content warning'