Menixis Claude Opus 4.8 (1M context) commited on
Commit
f0b6eee
·
1 Parent(s): 01672fa

Auto-form: fix invisible AI label (out-specify the white-label rule)

Browse files

The dark-blue AI chip rule tied on specificity with the later
'.stButton button[kind="primary"] … span { color:#fff }' rule, which won by
source order -> white text on a white chip. Raised the AI rule's specificity
(html body + [kind="primary"] + container chain) so the dark blue wins.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. streamlit_app.py +6 -2
streamlit_app.py CHANGED
@@ -708,9 +708,13 @@ st.markdown("""
708
  height: 3rem !important;
709
  }
710
  /* Highlight the "AI" in the generate button: the :violet[AI] markdown span becomes a
711
- glowing white chip/badge so it showcases the AI feature */
712
- .st-key-generate_btn button span[style*="color"]:not([data-testid]) {
 
 
 
713
  color: #1E3A8A !important; /* dark blue */
 
714
  font-weight: 800;
715
  letter-spacing: .6px;
716
  padding: 2px 10px;
 
708
  height: 3rem !important;
709
  }
710
  /* Highlight the "AI" in the generate button: the :violet[AI] markdown span becomes a
711
+ white chip/badge with dark-blue text so it showcases the AI feature.
712
+ NOTE: the selector must out-specify the later '.stButton button[kind="primary"]
713
+ [data-testid="stMarkdownContainer"] span { color:#fff }' rule, or the AI text gets
714
+ forced white-on-white (invisible). Hence the [kind="primary"] + container chain + html body. */
715
+ html body .st-key-generate_btn button[kind="primary"] [data-testid="stMarkdownContainer"] span[style*="color"] {
716
  color: #1E3A8A !important; /* dark blue */
717
+ -webkit-text-fill-color: #1E3A8A !important;
718
  font-weight: 800;
719
  letter-spacing: .6px;
720
  padding: 2px 10px;