Spaces:
Sleeping
Sleeping
Commit
·
68157ea
1
Parent(s):
5c8d948
fix: Force teal color for success boxes and clean slider styling
Browse filesSuccess boxes:
- Stronger CSS selectors to override Streamlit's green
- Force teal background on ALL success boxes
- Fix GPU Acceleration box to be teal
- Remove green icons and replace with teal
Sliders:
- Remove magenta highlight boxes from min/max values
- Keep only filled track and thumb in magenta
- Unfilled track in subtle grey
- Current value in magenta
- Min/max labels in normal grey text
Text inputs:
- Teal focus border instead of red
Result: Consistent teal/magenta theme throughout!
app.py
CHANGED
|
@@ -187,6 +187,11 @@ if page == "Garden Optimization":
|
|
| 187 |
# Add custom teal and magenta color scheme
|
| 188 |
st.markdown("""
|
| 189 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
/* Override Streamlit's default colors with teal and magenta */
|
| 191 |
.stButton>button {
|
| 192 |
background-color: #20B2AA !important;
|
|
@@ -216,16 +221,33 @@ if page == "Garden Optimization":
|
|
| 216 |
color: #20B2AA !important;
|
| 217 |
}
|
| 218 |
|
| 219 |
-
/*
|
| 220 |
-
|
| 221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
border-left: 4px solid #20B2AA !important;
|
| 223 |
-
color: #
|
| 224 |
}
|
| 225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
color: #E0F7F7 !important;
|
| 227 |
}
|
| 228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
/* Info boxes - keep default blue/dark, no pink highlight */
|
| 230 |
.stAlert[data-baseweb="notification"][kind="info"] {
|
| 231 |
background-color: rgba(49, 51, 63, 0.4) !important;
|
|
@@ -263,27 +285,33 @@ if page == "Garden Optimization":
|
|
| 263 |
background-color: #C71585 !important;
|
| 264 |
}
|
| 265 |
|
| 266 |
-
/* Slider -
|
|
|
|
| 267 |
.stSlider [data-baseweb="slider"] [role="slider"] {
|
| 268 |
background-color: #C71585 !important;
|
| 269 |
}
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
.stSlider [data-baseweb="slider"] > div > div {
|
| 274 |
background-color: #C71585 !important;
|
| 275 |
}
|
| 276 |
-
|
| 277 |
-
|
|
|
|
|
|
|
| 278 |
}
|
| 279 |
-
|
|
|
|
|
|
|
| 280 |
color: #C71585 !important;
|
| 281 |
}
|
| 282 |
-
|
|
|
|
| 283 |
.stSlider [data-testid="stTickBarMin"],
|
| 284 |
-
.stSlider [data-testid="stTickBarMax"]
|
| 285 |
-
|
| 286 |
-
color:
|
|
|
|
| 287 |
}
|
| 288 |
|
| 289 |
/* Number input increment/decrement buttons - magenta */
|
|
@@ -294,6 +322,16 @@ if page == "Garden Optimization":
|
|
| 294 |
background-color: rgba(199,21,133,0.1) !important;
|
| 295 |
}
|
| 296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 297 |
/* Step progress indicator with teal theme */
|
| 298 |
.step-container {
|
| 299 |
display: flex;
|
|
|
|
| 187 |
# Add custom teal and magenta color scheme
|
| 188 |
st.markdown("""
|
| 189 |
<style>
|
| 190 |
+
/* GLOBAL: Override ALL red colors with magenta */
|
| 191 |
+
* {
|
| 192 |
+
--primary-color: #C71585 !important;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
/* Override Streamlit's default colors with teal and magenta */
|
| 196 |
.stButton>button {
|
| 197 |
background-color: #20B2AA !important;
|
|
|
|
| 221 |
color: #20B2AA !important;
|
| 222 |
}
|
| 223 |
|
| 224 |
+
/* SUCCESS BOXES - FORCE TEAL EVERYWHERE (override default green) */
|
| 225 |
+
/* Target ALL possible success box selectors */
|
| 226 |
+
div[kind="success"],
|
| 227 |
+
.stAlert[kind="success"],
|
| 228 |
+
[data-testid="stNotification"][kind="success"],
|
| 229 |
+
[data-baseweb="notification"][kind="success"],
|
| 230 |
+
div[data-testid="stNotificationContentSuccess"],
|
| 231 |
+
section[data-testid="stSidebar"] div[kind="success"] {
|
| 232 |
+
background-color: rgba(32,178,170,0.3) !important;
|
| 233 |
border-left: 4px solid #20B2AA !important;
|
| 234 |
+
border-color: #20B2AA !important;
|
| 235 |
}
|
| 236 |
+
|
| 237 |
+
/* Text color in success boxes */
|
| 238 |
+
div[kind="success"] *,
|
| 239 |
+
.stAlert[kind="success"] *,
|
| 240 |
+
[data-testid="stNotification"][kind="success"] * {
|
| 241 |
color: #E0F7F7 !important;
|
| 242 |
}
|
| 243 |
|
| 244 |
+
/* Remove any green icon or background */
|
| 245 |
+
div[kind="success"] svg,
|
| 246 |
+
.stAlert[kind="success"] svg {
|
| 247 |
+
color: #20B2AA !important;
|
| 248 |
+
fill: #20B2AA !important;
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
/* Info boxes - keep default blue/dark, no pink highlight */
|
| 252 |
.stAlert[data-baseweb="notification"][kind="info"] {
|
| 253 |
background-color: rgba(49, 51, 63, 0.4) !important;
|
|
|
|
| 285 |
background-color: #C71585 !important;
|
| 286 |
}
|
| 287 |
|
| 288 |
+
/* Slider styling - clean magenta and grey */
|
| 289 |
+
/* Slider thumb (the circle you drag) - magenta */
|
| 290 |
.stSlider [data-baseweb="slider"] [role="slider"] {
|
| 291 |
background-color: #C71585 !important;
|
| 292 |
}
|
| 293 |
+
|
| 294 |
+
/* Slider track - filled portion (left of thumb) - magenta */
|
| 295 |
+
.stSlider [data-baseweb="slider"] [data-testid="stTickBar"] > div:first-child {
|
|
|
|
| 296 |
background-color: #C71585 !important;
|
| 297 |
}
|
| 298 |
+
|
| 299 |
+
/* Slider track - unfilled portion (right of thumb) - grey */
|
| 300 |
+
.stSlider [data-baseweb="slider"] [data-testid="stTickBar"] {
|
| 301 |
+
background-color: rgba(250, 250, 250, 0.2) !important;
|
| 302 |
}
|
| 303 |
+
|
| 304 |
+
/* Current value (the number above the thumb) - magenta */
|
| 305 |
+
.stSlider [data-testid="stThumbValue"] {
|
| 306 |
color: #C71585 !important;
|
| 307 |
}
|
| 308 |
+
|
| 309 |
+
/* Min and max labels - normal grey text, NOT highlighted */
|
| 310 |
.stSlider [data-testid="stTickBarMin"],
|
| 311 |
+
.stSlider [data-testid="stTickBarMax"] {
|
| 312 |
+
color: rgba(250, 250, 250, 0.6) !important;
|
| 313 |
+
background-color: transparent !important;
|
| 314 |
+
padding: 0 !important;
|
| 315 |
}
|
| 316 |
|
| 317 |
/* Number input increment/decrement buttons - magenta */
|
|
|
|
| 322 |
background-color: rgba(199,21,133,0.1) !important;
|
| 323 |
}
|
| 324 |
|
| 325 |
+
/* Text input fields - remove red focus/border, use teal */
|
| 326 |
+
.stTextInput input:focus,
|
| 327 |
+
.stTextInput input:active {
|
| 328 |
+
border-color: #20B2AA !important;
|
| 329 |
+
box-shadow: 0 0 0 0.2rem rgba(32,178,170,0.25) !important;
|
| 330 |
+
}
|
| 331 |
+
.stTextInput input {
|
| 332 |
+
border-color: rgba(250, 250, 250, 0.2) !important;
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
/* Step progress indicator with teal theme */
|
| 336 |
.step-container {
|
| 337 |
display: flex;
|