Skip to content

Commit

Permalink
Restore light/dark custom setting (#9716)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Oct 16, 2024
1 parent b1a0f6d commit 3c7f2ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/calm-emus-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": patch
---

fix:Restore light/dark custom setting
2 changes: 1 addition & 1 deletion gradio/themes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def repl_func(match):
+ "\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}"
)
Expand Down

0 comments on commit 3c7f2ad

Please sign in to comment.