Mahdi Naser Moghadasi commited on
Commit
bec2c19
·
1 Parent(s): 0b4267f

🌞 Force light mode always: Disable dark mode even when users have Mac dark mode enabled

Browse files
Files changed (1) hide show
  1. app.py +26 -2
app.py CHANGED
@@ -2866,12 +2866,36 @@ def remove_pdf_context():
2866
  # Create Gradio interface with custom CSS
2867
  with gr.Blocks(
2868
  title="BrightMind AI - Educational Content Generator",
2869
- theme=gr.themes.Soft(),
 
 
2870
  css="""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2871
  /* Modern UI Framework */
2872
  .gradio-container {
2873
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
2874
- background: #ffffff;
 
2875
  min-height: 100vh;
2876
  position: relative;
2877
  overflow: hidden;
 
2866
  # Create Gradio interface with custom CSS
2867
  with gr.Blocks(
2868
  title="BrightMind AI - Educational Content Generator",
2869
+ theme=gr.themes.Soft().set(
2870
+ color_mode="light" # Force light mode always, disable dark mode
2871
+ ),
2872
  css="""
2873
+ /* Force Light Mode - Disable Dark Mode */
2874
+ :root {
2875
+ color-scheme: light only !important;
2876
+ }
2877
+
2878
+ *, *::before, *::after {
2879
+ color-scheme: light !important;
2880
+ }
2881
+
2882
+ /* Override any dark mode media queries */
2883
+ @media (prefers-color-scheme: dark) {
2884
+ * {
2885
+ color-scheme: light !important;
2886
+ }
2887
+
2888
+ body, html, .gradio-container {
2889
+ background: #ffffff !important;
2890
+ color: #000000 !important;
2891
+ }
2892
+ }
2893
+
2894
  /* Modern UI Framework */
2895
  .gradio-container {
2896
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
2897
+ background: #ffffff !important;
2898
+ color: #000000 !important;
2899
  min-height: 100vh;
2900
  position: relative;
2901
  overflow: hidden;