Spaces:
Paused
Paused
Fix mobile text color visibility issues - Add explicit text color styling and mobile CSS media queries
Browse files- app/streamlit_app.py +35 -2
app/streamlit_app.py
CHANGED
|
@@ -645,6 +645,39 @@ def main():
|
|
| 645 |
|
| 646 |
|
| 647 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 648 |
.stButton > button {
|
| 649 |
background-color: #0B3B0B;
|
| 650 |
color: white;
|
|
@@ -733,7 +766,7 @@ def main():
|
|
| 733 |
st.markdown("### Navigation")
|
| 734 |
st.markdown("---")
|
| 735 |
|
| 736 |
-
if st.button("🎯
|
| 737 |
st.session_state.current_step = 4
|
| 738 |
st.rerun()
|
| 739 |
|
|
@@ -910,7 +943,7 @@ def render_step_3():
|
|
| 910 |
with col1:
|
| 911 |
st.markdown("""
|
| 912 |
<div style="text-align: center; padding: 20px; border: 2px solid #4CAF50; border-radius: 15px; margin: 10px 0;">
|
| 913 |
-
<h3 style="color: #0B3B0B;">🎯
|
| 914 |
<p>Get personalized swing analysis with specific tips for improvement</p>
|
| 915 |
</div>
|
| 916 |
""", unsafe_allow_html=True)
|
|
|
|
| 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 {
|
| 661 |
+
color: #0B3B0B !important;
|
| 662 |
+
font-weight: 500 !important;
|
| 663 |
+
}
|
| 664 |
+
|
| 665 |
+
/* Stronger contrast for mobile */
|
| 666 |
+
.element-container, .stMarkdown div, p, span, h1, h2, h3, h4, h5, h6 {
|
| 667 |
+
color: #0B3B0B !important;
|
| 668 |
+
text-shadow: none !important;
|
| 669 |
+
}
|
| 670 |
+
}
|
| 671 |
+
|
| 672 |
+
/* Dark mode override for mobile browsers */
|
| 673 |
+
@media (prefers-color-scheme: dark) {
|
| 674 |
+
.stMarkdown, .stMarkdown p, .stMarkdown h1, .stMarkdown h2, .stMarkdown h3, .stMarkdown h4,
|
| 675 |
+
.element-container, .stMarkdown div, p, span, h1, h2, h3, h4, h5, h6 {
|
| 676 |
+
color: #0B3B0B !important;
|
| 677 |
+
background-color: transparent !important;
|
| 678 |
+
}
|
| 679 |
+
}
|
| 680 |
+
|
| 681 |
.stButton > button {
|
| 682 |
background-color: #0B3B0B;
|
| 683 |
color: white;
|
|
|
|
| 766 |
st.markdown("### Navigation")
|
| 767 |
st.markdown("---")
|
| 768 |
|
| 769 |
+
if st.button("🎯 See Feedback", key="nav_improvements", use_container_width=True):
|
| 770 |
st.session_state.current_step = 4
|
| 771 |
st.rerun()
|
| 772 |
|
|
|
|
| 943 |
with col1:
|
| 944 |
st.markdown("""
|
| 945 |
<div style="text-align: center; padding: 20px; border: 2px solid #4CAF50; border-radius: 15px; margin: 10px 0;">
|
| 946 |
+
<h3 style="color: #0B3B0B;">🎯 See Feedback</h3>
|
| 947 |
<p>Get personalized swing analysis with specific tips for improvement</p>
|
| 948 |
</div>
|
| 949 |
""", unsafe_allow_html=True)
|