Allow for saving of theme custom CSS when changing a palette or advanced theme element in the UI

This commit is contained in:
ebolam
2022-09-21 08:25:28 -04:00
parent d000aa7dc3
commit 2debbc0cc8
2 changed files with 39 additions and 28 deletions

View File

@@ -8102,6 +8102,10 @@ def UI_2_theme_change(data):
for key, value in data['theme'].items():
f.write("\t{}: {};\n".format(key, value.replace(";", "").replace("--", "-")))
f.write("}")
f.write("--------Special Rules from Original Theme---------")
for rule in data['special_rules']:
f.write(rule)
f.write("\n")
if koboldai_vars.debug:
print("Theme Saved")