chenemii commited on
Commit
17eb033
·
1 Parent(s): 8d1c777

Fix button text visibility - ensure beige text on dark green buttons

Browse files
Files changed (1) hide show
  1. app/streamlit_app.py +26 -6
app/streamlit_app.py CHANGED
@@ -645,16 +645,22 @@ def main():
645
 
646
 
647
 
648
- /* Fix text color visibility for mobile and all devices */
649
  .stMarkdown, .stMarkdown p, .stMarkdown h1, .stMarkdown h2, .stMarkdown h3, .stMarkdown h4 {
650
  color: #0B3B0B !important;
651
  }
652
 
653
- /* Ensure all text elements have proper contrast */
654
  .element-container, .stMarkdown div, p, span, h1, h2, h3, h4, h5, h6 {
655
  color: #0B3B0B !important;
656
  }
657
 
 
 
 
 
 
 
658
  /* Mobile-specific text styling */
659
  @media (max-width: 768px) {
660
  .stMarkdown, .stMarkdown p, .stMarkdown h1, .stMarkdown h2, .stMarkdown h3, .stMarkdown h4 {
@@ -667,6 +673,13 @@ def main():
667
  color: #0B3B0B !important;
668
  text-shadow: none !important;
669
  }
 
 
 
 
 
 
 
670
  }
671
 
672
  /* Dark mode override for mobile browsers */
@@ -676,21 +689,28 @@ def main():
676
  color: #0B3B0B !important;
677
  background-color: transparent !important;
678
  }
 
 
 
 
 
 
679
  }
680
 
681
  .stButton > button {
682
- background-color: #0B3B0B;
683
- color: white;
684
  border-radius: 25px;
685
  border: none;
686
  padding: 12px 28px;
687
- font-weight: bold;
688
  font-size: 16px;
689
  transition: all 0.3s ease;
690
  }
691
 
692
  .stButton > button:hover {
693
- background-color: #4CAF50;
 
694
  transform: translateY(-1px);
695
  }
696
  </style>
 
645
 
646
 
647
 
648
+ /* Fix text color visibility for mobile and all devices - EXCEPT buttons */
649
  .stMarkdown, .stMarkdown p, .stMarkdown h1, .stMarkdown h2, .stMarkdown h3, .stMarkdown h4 {
650
  color: #0B3B0B !important;
651
  }
652
 
653
+ /* Ensure all text elements have proper contrast - EXCEPT buttons */
654
  .element-container, .stMarkdown div, p, span, h1, h2, h3, h4, h5, h6 {
655
  color: #0B3B0B !important;
656
  }
657
 
658
+ /* Override text color for buttons to ensure proper contrast */
659
+ .stButton > button, .stButton > button * {
660
+ color: #fffdfa !important;
661
+ background-color: #0B3B0B !important;
662
+ }
663
+
664
  /* Mobile-specific text styling */
665
  @media (max-width: 768px) {
666
  .stMarkdown, .stMarkdown p, .stMarkdown h1, .stMarkdown h2, .stMarkdown h3, .stMarkdown h4 {
 
673
  color: #0B3B0B !important;
674
  text-shadow: none !important;
675
  }
676
+
677
+ /* Ensure button text stays visible on mobile */
678
+ .stButton > button, .stButton > button * {
679
+ color: #fffdfa !important;
680
+ background-color: #0B3B0B !important;
681
+ font-weight: bold !important;
682
+ }
683
  }
684
 
685
  /* Dark mode override for mobile browsers */
 
689
  color: #0B3B0B !important;
690
  background-color: transparent !important;
691
  }
692
+
693
+ /* Ensure button text stays beige/white even in dark mode */
694
+ .stButton > button, .stButton > button * {
695
+ color: #fffdfa !important;
696
+ background-color: #0B3B0B !important;
697
+ }
698
  }
699
 
700
  .stButton > button {
701
+ background-color: #0B3B0B !important;
702
+ color: #fffdfa !important;
703
  border-radius: 25px;
704
  border: none;
705
  padding: 12px 28px;
706
+ font-weight: bold !important;
707
  font-size: 16px;
708
  transition: all 0.3s ease;
709
  }
710
 
711
  .stButton > button:hover {
712
+ background-color: #4CAF50 !important;
713
+ color: #fffdfa !important;
714
  transform: translateY(-1px);
715
  }
716
  </style>