Merge pull request #16153 from light-and-ray/fix_ui_flashing_on_reload_and_fast_scrollong

fix ui flashing on reloading and fast scrollong
This commit is contained in:
AUTOMATIC1111
2024-07-07 08:37:58 +03:00
parent 340a9108ca
commit b5481c6195
2 changed files with 46 additions and 0 deletions

View File

@@ -41,6 +41,11 @@ def css_html():
if os.path.exists(user_css):
head += stylesheet(user_css)
from modules.shared_gradio_themes import resolve_var
light = resolve_var('background_fill_primary')
dark = resolve_var('background_fill_primary_dark')
head += f'<style>html {{ background-color: {light}; }} @media (prefers-color-scheme: dark) {{ html {{background-color: {dark}; }} }}</style>'
return head