Restore light/dark custom setting (#9716)

* changes

* add changeset

* add changeset

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
aliabid94 2024-10-15 22:37:11 -07:00 committed by GitHub
parent b1a0f6db0d
commit 3c7f2ad15f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"gradio": patch
---
fix:Restore light/dark custom setting

View File

@ -86,7 +86,7 @@ class ThemeClass:
+ "\n}"
)
dark_css_code = (
"@media (prefers-color-scheme: dark) {\n:root {\n"
"\n:root .dark {\n"
+ "\n".join([f" --{attr}: {val};" for attr, val in dark_css.items()])
+ "\n}\n}"
)