James McCool commited on
Commit
43548f0
·
1 Parent(s): 74db518

Update CSS selectors in Streamlit app for button styling to improve layout consistency and remove unnecessary div styling.

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +4 -8
src/streamlit_app.py CHANGED
@@ -34,11 +34,11 @@ fd_sd_columns = ['CPT', 'FLEX1', 'FLEX2', 'FLEX3', 'FLEX4', 'FLEX5', 'salary', '
34
  st.markdown("""
35
  <style>
36
  /* Tab styling */
37
- .stControl [data-baseweb="button-group"] {
38
  gap: 8px;
39
  padding: 4px;
40
  }
41
- .stControl [data-baseweb="button"] {
42
  height: 50px;
43
  white-space: pre-wrap;
44
  background-color: #DAA520;
@@ -49,12 +49,12 @@ st.markdown("""
49
  font-weight: bold;
50
  transition: all 0.3s ease;
51
  }
52
- .stControl [aria-selected="true"] {
53
  background-color: #DAA520;
54
  border: 3px solid #FFD700;
55
  color: white;
56
  }
57
- .stControl [data-baseweb="button"]:hover {
58
  background-color: #FFD700;
59
  cursor: pointer;
60
  }
@@ -64,10 +64,6 @@ st.markdown("""
64
  color: white;
65
  }
66
 
67
- div{
68
- box-sizing: content-box !important;
69
- }
70
-
71
  </style>""", unsafe_allow_html=True)
72
 
73
  @st.cache_resource(ttl=60)
 
34
  st.markdown("""
35
  <style>
36
  /* Tab styling */
37
+ .stElementContainer [data-baseweb="button-group"] {
38
  gap: 8px;
39
  padding: 4px;
40
  }
41
+ .stElementContainer [data-baseweb="stBaseButton-segmented_control"] {
42
  height: 50px;
43
  white-space: pre-wrap;
44
  background-color: #DAA520;
 
49
  font-weight: bold;
50
  transition: all 0.3s ease;
51
  }
52
+ .stElementContainer [aria-selected="true"] {
53
  background-color: #DAA520;
54
  border: 3px solid #FFD700;
55
  color: white;
56
  }
57
+ .stElementContainer [data-baseweb="stBaseButton-segmented_control"]:hover {
58
  background-color: #FFD700;
59
  cursor: pointer;
60
  }
 
64
  color: white;
65
  }
66
 
 
 
 
 
67
  </style>""", unsafe_allow_html=True)
68
 
69
  @st.cache_resource(ttl=60)